pro*c multiple database connections

Associate
Joined
3 Oct 2004
Posts
68
Location
Biggin Hill
Hi all,

I wonder if anyone out there can help me. I want to connect to a few Oracle databases at one time and would like to store the names in an array, as the databases will vary as they are held on a databse table that will graow and shrink from time to time. I have been trying the following with little success and wondered if anyone has done something similar:

EXEC SQL DECLARE db_name[ARRSIZE] DATABASE;

EXEC SQL CONNECT userid IDENTIFIED BY password AT db_name USING db_string;

I am trying to keep the database information soft coded, but all the examples I can find require a hardcode database name, i.e.:

EXEC SQL DECLARE db_name1 DATABASE;
EXEC SQL DECLARE db_name2 DATABASE;

If anyone knows of any way to acheive this, I would be very grateful.

If you need any further info, please shout

Many Thanks

Dean
 
Back
Top Bottom