Re: Question on connection to multiple databases

From: Stephen G. Coleman <sgc_at_wks40hp.shell.com>
Date: Wed, 15 Mar 1995 18:03:44 GMT
Message-ID: <D5Hu69.Aru_at_shellgate.shell.com>


Yes, you can connect to multiple databases in a C program:

EXEC SQL DECLARE CENTRAL_DB DATABASE ;
strcpy( central_two_task, getenv("CENTRAL_TWO_TASK") ); EXEC SQL CONNECT :usr_pwd AT CENTRAL_DB USING :central_two_task ;

You might try database links and have a single connect session???

Steve

In article <D58MBH.KpB_at_ccc.amdahl.com>, vlohia_at_oes.amdahl.com (Ved Lohia) writes:
>> I want to write a C program which connects to serveral database
>> instances and query them periodicaly.
>>
>> Is there a way to just connect once to all database instances and
>> then reference a database instace in a query?
>>
>> Thanx,
>>
>> Ved
>>
>>
Received on Wed Mar 15 1995 - 19:03:44 CET

Original text of this message