Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Connect to Different Databases in Pro*C

Connect to Different Databases in Pro*C

From: <nick_at_embassy.org>
Date: 1997/09/24
Message-ID: <875124547.25291@dejanews.com>#1/1

Hi all,

I tried to use the following Pro*C statement to connect to different oracle database instance on the same Solaris machine.

EXEC SQL CONNECT :username IDENTIFIED BY :password AT :databasename;

The statement executes and returns succesfully, but all the subsequent EXEC SQL EXECUTE calls return with an error of not logged on.

If I remove "AT: databasename" in the above connect statement, i.e. to use the default database specified by ORACLE_SID environment variable, then all the subsequent EXEC SQL EXECUTE calls get executed successfully. But this limits the application's ability to connect to only one single database.

So, what's the correct way to connect to different database server in Pro*C?

I appreciate any helpful information.

Nick Chang

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet
Received on Wed Sep 24 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US