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

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to connect via Net8 in Pro*C program?

Re: How to connect via Net8 in Pro*C program?

From: <kirk_at_kaybee.org>
Date: 18 Mar 2000 02:45:58 GMT
Message-ID: <8auql6$t07$1@news-int.gatech.edu>


GHouck <hksys_at_teleport.com> wrote:
: The following should work, if <connectStr> is your
: connect string "user/pass_at_tweb" from above:
:
: EXEC SQL CONNECT :connectStr;

I tried your suggestion, as well as this other way, and all I get is segmentation faults:
EXEC SQL CONNECT :username IDENTIFIED BY :password USING :connect;

Where :connect is "tweb". However, on the same machine, the following works just fine:
EXEC SQL CONNECT :username IDENTIFIED BY :password;

Likewise, the following works on the same machine on the command line:

   sqlplus username/password_at_tweb

Finally, if I do:

   EXEC SQL CONNECT :username IDENTIFIED BY :password USING :connect; With :connect being some random text, I actually get an error and it doesn't crash:

   Oracle Error (Login): ORA-12154: TNS:could not resolve service name

--
 Kirk Bauer -- CmpE, Georgia Tech -- kirk_at_kaybee.org -- Avid Linux User

    GT Sport Parachuting Club! http://cyberbuzz.gatech.edu/skydive      Opinions expressed are my own, but they should be everybody's. Received on Fri Mar 17 2000 - 20:45:58 CST

Original text of this message

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