connecting IDS on different machines
Posted in 2009
A 4GL developer (IDS 9.40, SuSE, 4Js compiler) couldn't connect from a program to a database on another server: CONNECT TO dbsname@ol_othermachine produced a syntax error, though it worked in dbaccess. The answer: the database environment string must be quoted, e.g. CONNECT TO 'dbs@ol_dbs'. That worked. A follow-up asked about using a variable instead of a literal; Art Kagel said a variable should work in 4GL (it certainly does in ESQL/C), and the poster also confirmed that DATABASE dbs@ol_dbs is valid; alternatively INFORMIXSERVER can be set outside the program.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Server Administration
Hi experts!
I can use dbaccess to make a connection to another database on another machine.
But what do I need to put in my 4GL program to make this connection??
connect to dbsname@ol_othermachine gives a syntax error
Any idea??
Thanks!
Danny
DANNY DE KOSTER wrote:
> Hi experts!
>
> I can use dbaccess to make a connection to another database on another
> machine.
> But what do I need to put in my 4GL program to make this connection??
>
> connect to dbsname@ol_othermachine gives a syntax error
Version information?
What happens if you wrap the CONNECT in SQL / END SQL?
--
Cheers,
Obnoxio The Clown
http://obotheclown.blogspot.com
I will now proceed to pleasure myself with this fish.
--
This message has been scanned for viruses and
dangerous content by OpenProtect(http://www.openprotect.com), and is
believed to be clean.
Thanks for the answer
SuSe 8.2
IDS 9.40
4j compiler verion 3.10i.
Well it compiles.
But in execution it returns a syntax error on the line SQL
[cid:image001.png@01CA848F.80A64310]
Met vriendelijke groeten / Sincères salutations / Kinds regards,
Danny De Koster
FIDELITY SOFT nv
Cardijnstraat 5
1980 Eppegem
Tel: 015/618.270
Fax: 015/616.052
-----Oorspronkelijk bericht-----
Van: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] Namens Obnoxio The
Clown
Verzonden: donderdag 24 december 2009 11:35
Aan: ids@iiug.org
Onderwerp: Re: connecting IDS on different machines [18482]
DANNY DE KOSTER wrote:
> Hi experts!
>
> I can use dbaccess to make a connection to another database on another
> machine.
> But what do I need to put in my 4GL program to make this connection??
>
> connect to dbsname@ol_othermachine gives a syntax error
Version information?
What happens if you wrap the CONNECT in SQL / END SQL?
--
Cheers,
Obnoxio The Clown
http://obotheclown.blogspot.com
I will now proceed to pleasure myself with this fish.
--
This message has been scanned for viruses and
dangerous content by OpenProtect(http://www.openprotect.com), and is
believed to be clean.
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
Danny DE KOSTER wrote: > Thanks for the answer > > > > SuSe 8.2 > > IDS 9.40 > > > > 4j compiler verion 3.10i. > > > > Well it compiles. > > But in execution it returns a syntax error on the line SQL I think the access1@ol_fidsrv103 needs to be in single quotes: 'access1@ol_fidsrv103' -- Cheers, Obnoxio The Clown http://obotheclown.blogspot.com I will now proceed to pleasure myself with this fish. -- This message has been scanned for viruses and dangerous content by OpenProtect(http://www.openprotect.com), and is believed to be clean.
IB you need to put the database environment string in quotes:
connect to 'dbsname@ol_othermachine';
Art
Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@iiug.org)
See you at the 2010 IIUG Informix Conference
April 25-28, 2010
Overland Park (Kansas City), KS
www.iiug.org/conf
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Oninit, the IIUG, nor any other organization
with which I am associated either explicitly or implicitly. Neither do
those opinions reflect those of other individuals affiliated with any entity
with which I am affiliated nor those of the entities themselves.
On Thu, Dec 24, 2009 at 5:27 AM, DANNY DE KOSTER <ddk@fidelity-soft.be>wrote:
> Hi experts!
>
> I can use dbaccess to make a connection to another database on another
> machine.
> But what do I need to put in my 4GL program to make this connection??
>
> connect to dbsname@ol_othermachine gives a syntax error
>
> Any idea??
> Thanks!
> Danny
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--0015173ff15e4e8cb9047b779559
Art,
I just succeeded before your answer. Thanks!!!
Met vriendelijke groeten / Sincères salutations / Kinds regards,
Danny De Koster
FIDELITY SOFT nv
Cardijnstraat 5
1980 Eppegem
Tel: 015/618.270
Fax: 015/616.052
-----Oorspronkelijk bericht-----
Van: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] Namens Art Kagel
Verzonden: donderdag 24 december 2009 12:18
Aan: ids@iiug.org
Onderwerp: Re: connecting IDS on different machines [18485]
IB you need to put the database environment string in quotes:
connect to 'dbsname@ol_othermachine';
Art
Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@iiug.org)
See you at the 2010 IIUG Informix Conference
April 25-28, 2010
Overland Park (Kansas City), KS
www.iiug.org/conf
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Oninit, the IIUG, nor any other organization
with which I am associated either explicitly or implicitly. Neither do
those opinions reflect those of other individuals affiliated with any entity
with which I am affiliated nor those of the entities themselves.
On Thu, Dec 24, 2009 at 5:27 AM, DANNY DE KOSTER <ddk@fidelity-soft.be>wrote:
> Hi experts!
>
> I can use dbaccess to make a connection to another database on another
> machine.
> But what do I need to put in my 4GL program to make this connection??
>
> connect to dbsname@ol_othermachine gives a syntax error
>
> Any idea??
> Thanks!
> Danny
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--0015173ff15e4e8cb9047b779559
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
Art or someone else,
I indeed succeeded with a simple program. I hardcoded connect to "dbs@ol_dbs"
in my 4GL.
But can I also work with a variable?? So connect to a variable.
Met vriendelijke groeten / Sincères salutations / Kinds regards,
Danny De Koster
FIDELITY SOFT nv
Cardijnstraat 5
1980 Eppegem
Tel: 015/618.270
Fax: 015/616.052
-----Oorspronkelijk bericht-----
Van: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] Namens Danny DE KOSTER
Verzonden: donderdag 24 december 2009 12:22
Aan: ids@iiug.org
Onderwerp: RE: connecting IDS on different machines [18486]
Art,
I just succeeded before your answer. Thanks!!!
Met vriendelijke groeten / Sincères salutations / Kinds regards,
Danny De Koster
FIDELITY SOFT nv
Cardijnstraat 5
1980 Eppegem
Tel: 015/618.270
Fax: 015/616.052
-----Oorspronkelijk bericht-----
Van: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] Namens Art Kagel
Verzonden: donderdag 24 december 2009 12:18
Aan: ids@iiug.org
Onderwerp: Re: connecting IDS on different machines [18485]
IB you need to put the database environment string in quotes:
connect to 'dbsname@ol_othermachine';
Art
Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@iiug.org)
See you at the 2010 IIUG Informix Conference
April 25-28, 2010
Overland Park (Kansas City), KS
www.iiug.org/conf
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Oninit, the IIUG, nor any other organization
with which I am associated either explicitly or implicitly. Neither do
those opinions reflect those of other individuals affiliated with any entity
with which I am affiliated nor those of the entities themselves.
On Thu, Dec 24, 2009 at 5:27 AM, DANNY DE KOSTER <ddk@fidelity-soft.be>wrote:
> Hi experts!
>
> I can use dbaccess to make a connection to another database on another
> machine.
> But what do I need to put in my 4GL program to make this connection??
>
> connect to dbsname@ol_othermachine gives a syntax error
>
> Any idea??
> Thanks!
> Danny
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--0015173ff15e4e8cb9047b779559
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
Danny DE KOSTER wrote: > Art or someone else, > > I indeed succeeded with a simple program. I hardcoded connect to "dbs@ol_dbs" > in my 4GL. > But can I also work with a variable?? So connect to a variable. I don't think so. But I think the DATABASE statement will accept variables. -- Cheers, Obnoxio The Clown http://obotheclown.blogspot.com I will now proceed to pleasure myself with this fish. -- This message has been scanned for viruses and dangerous content by OpenProtect(http://www.openprotect.com), and is believed to be clean.
I used the database dbs statement but I didn't know that we could have database dbs@ol_dbs. Thanks for your help!!! Met vriendelijke groeten / Sincères salutations / Kinds regards, Danny De Koster FIDELITY SOFT nv Cardijnstraat 5 1980 Eppegem Tel: 015/618.270 Fax: 015/616.052 -----Oorspronkelijk bericht----- Van: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] Namens Obnoxio The Clown Verzonden: donderdag 24 december 2009 13:02 Aan: ids@iiug.org Onderwerp: Re: connecting IDS on different machines [18488] Danny DE KOSTER wrote: > Art or someone else, > > I indeed succeeded with a simple program. I hardcoded connect to "dbs@ol_dbs" > in my 4GL. > But can I also work with a variable?? So connect to a variable. I don't think so. But I think the DATABASE statement will accept variables. -- Cheers, Obnoxio The Clown http://obotheclown.blogspot.com I will now proceed to pleasure myself with this fish. -- This message has been scanned for viruses and dangerous content by OpenProtect(http://www.openprotect.com), and is believed to be clean. ******************************************************************************* Forum Note: Use "Reply" to post a response in the discussion forum.
Danny DE KOSTER wrote: > I used the database dbs statement but I didn't know that we could have > database dbs@ol_dbs. I don't know if you can ... but you can set the INFORMIXSERVER outside the program ... -- Cheers, Obnoxio The Clown http://obotheclown.blogspot.com I will now proceed to pleasure myself with this fish. -- This message has been scanned for viruses and dangerous content by OpenProtect(http://www.openprotect.com), and is believed to be clean.
FYI. yes you can do database dbs@ol_dbs. Met vriendelijke groeten / Sincères salutations / Kinds regards, Danny De Koster FIDELITY SOFT nv Cardijnstraat 5 1980 Eppegem Tel: 015/618.270 Fax: 015/616.052 -----Oorspronkelijk bericht----- Van: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] Namens Obnoxio The Clown Verzonden: donderdag 24 december 2009 13:17 Aan: ids@iiug.org Onderwerp: Re: connecting IDS on different machines [18490] Danny DE KOSTER wrote: > I used the database dbs statement but I didn't know that we could have > database dbs@ol_dbs. I don't know if you can ... but you can set the INFORMIXSERVER outside the program ... -- Cheers, Obnoxio The Clown http://obotheclown.blogspot.com I will now proceed to pleasure myself with this fish. -- This message has been scanned for viruses and dangerous content by OpenProtect(http://www.openprotect.com), and is believed to be clean. ******************************************************************************* Forum Note: Use "Reply" to post a response in the discussion forum.
Danny DE KOSTER wrote: > FYI. yes you can do database dbs@ol_dbs. Well, that's a bit of a result then. :o) -- Cheers, Obnoxio The Clown http://obotheclown.blogspot.com I will now proceed to pleasure myself with this fish. -- This message has been scanned for viruses and dangerous content by OpenProtect(http://www.openprotect.com), and is believed to be clean.
You should be able to use a variable for the database environment in a
CONNECT statement in 4GL. You can certainly do that in ESQL/C!
Art
Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@iiug.org)
See you at the 2010 IIUG Informix Conference
April 25-28, 2010
Overland Park (Kansas City), KS
www.iiug.org/conf
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Oninit, the IIUG, nor any other organization
with which I am associated either explicitly or implicitly. Neither do
those opinions reflect those of other individuals affiliated with any entity
with which I am affiliated nor those of the entities themselves.
On Thu, Dec 24, 2009 at 6:55 AM, Danny DE KOSTER <ddk@fidelity-soft.be>wrote:
> Art or someone else,
>
> I indeed succeeded with a simple program. I hardcoded connect to
> "dbs@ol_dbs"
> in my 4GL.
> But can I also work with a variable?? So connect to a variable.
>
> Met vriendelijke groeten / Sincères salutations / Kinds regards,
>
> Danny De Koster
>
> FIDELITY SOFT nv
> Cardijnstraat 5
> 1980 Eppegem
>
> Tel: 015/618.270
> Fax: 015/616.052
>
> -----Oorspronkelijk bericht-----
> Van: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] Namens Danny DE
> KOSTER
> Verzonden: donderdag 24 december 2009 12:22
> Aan: ids@iiug.org
> Onderwerp: RE: connecting IDS on different machines [18486]
>
> Art,
>
> I just succeeded before your answer. Thanks!!!
>
> Met vriendelijke groeten / Sincères salutations / Kinds regards,
>
> Danny De Koster
>
> FIDELITY SOFT nv
> Cardijnstraat 5
> 1980 Eppegem
>
> Tel: 015/618.270
> Fax: 015/616.052
>
> -----Oorspronkelijk bericht-----
> Van: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] Namens Art Kagel
> Verzonden: donderdag 24 december 2009 12:18
> Aan: ids@iiug.org
> Onderwerp: Re: connecting IDS on different machines [18485]
>
> IB you need to put the database environment string in quotes:
>
> connect to 'dbsname@ol_othermachine';
>
> Art
>
> Art S. Kagel
> Oninit (www.oninit.com)
> IIUG Board of Directors (art@iiug.org)
>
> See you at the 2010 IIUG Informix Conference
> April 25-28, 2010
> Overland Park (Kansas City), KS
> www.iiug.org/conf
>
> Disclaimer: Please keep in mind that my own opinions are my own opinions
> and
> do not reflect on my employer, Oninit, the IIUG, nor any other organization
> with which I am associated either explicitly or implicitly. Neither do
> those opinions reflect those of other individuals affiliated with any
> entity
> with which I am affiliated nor those of the entities themselves.
>
> On Thu, Dec 24, 2009 at 5:27 AM, DANNY DE KOSTER <ddk@fidelity-soft.be
> >wrote:
>
> > Hi experts!
> >
> > I can use dbaccess to make a connection to another database on another
> > machine.
> > But what do I need to put in my 4GL program to make this connection??
> >
> > connect to dbsname@ol_othermachine gives a syntax error
> >
> > Any idea??
> > Thanks!
> > Danny
> >
> >
> >
> >
>
>
>
>
*******************************************************************************
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
> >
>
> --0015173ff15e4e8cb9047b779559
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--00151747be3efd3e57047b7a8d2d