multiple database connections in Pro*C

From: Gary Beckler <gary_l_beckler_nonlilly_at_lilly.com>
Date: Fri, 22 Sep 2000 13:41:22 GMT
Message-ID: <01c0249b$8e990e20$61c80928_at_PC07AH6T64WC>


[Quoted] A Pro*C program has one database connection to a default database:

    EXEC SQL CONNECT :username1 IDENTIFIED BY :password1 USING :db_string1

[Quoted] I would like to add a second connection to a non-default database:

    EXEC SQL DECLARE DB_NAME DATABASE
    EXEC SQL CONNECT :username2 IDENTIFIED BY :password2 AT DB_NAME     USING :db_string2

[Quoted] Do I need to make the first connection a non-default database connection or [Quoted] can concurrent default and non-default database connections be used together?

Also, can the

    EXEC SQL COMMIT RELEASE statement be used to close both connections or do I need two statements:

    EXEC SQL COMMIT RELEASE
    EXEC SQL COMMIT AT DB_NAME RELEASE

-- 
Gary Beckler
Received on Fri Sep 22 2000 - 15:41:22 CEST

Original text of this message