|
Re: How to connect to a 2nd database in Pro*C [message #94222 is a reply to message #94220] |
Sun, 23 May 2004 11:07 |
Dheeraj Anand
Messages: 5 Registered: May 2004
|
Junior Member |
|
|
Hi,
Here is the way: -
EXEC SQL DECLARE DB_NAME1 DATABASE;
EXEC SQL DECLARE DB_NAME2 DATABASE;
EXEC SQL CONNECT :username IDENTIFIED BY :password AT DB_NAME1 USING :db_string1;
EXEC SQL CONNECT :username IDENTIFIED BY :password AT DB_NAME2 USING :db_string2;
Usage: -
EXEC SQL AT DB_NAME1 select * from test1'
EXEC SQL AT DB_NAME2 select * from test2'
Dheeraj
|
|
|
|
|