Re: PRO*C and SQL CONNECT

From: Ian Dixon <uidixon!idixon_at_infocom.co.uk>
Date: 14 Aug 93 20:23:24 GMT
Message-ID: <8HYbsA7GBh107h_at_uidixon.uucp>


In <1993Aug13.040524.11963_at_amoco.com> zdxc0d_at_amoco.com (David Crowson) writes:
>In article kvo_at_bigguy.eng.ufl.edu, bvd_at_mis.engnet.ufl.edu (Bruce Van Dotten) writes:
>-->I wish to write a C executable program that performs a simple operation of
>-->connecting to the database and running a select statement. My problem is PRO*C and
>[stuff deleted]
>-->
>-->I compile with the standard proc.mk (i.e. 'make -f proc.mk programc ') and
>-->then run the program. However, I receive the error message:
>--> ERROR during Connect - ORA 6105.
>-->
>-->What's going wrong!!!
>-->NOTE: I print out the contents of :userid with no problem.
>--> I use the same CONNECT syntax with sqlplus with no problem.
>If you type 'oerr ora 6105' you get the following from the error message
>program......
 

>% oerr ora 6105
>06105, 00000, "NETTCP: remote host is unknown"
>// *Cause: Host name specified in the login (connect) string is unknown.
>// *Action: Check spelling; make sure name is in the TCP/IP HOST file.
>
 

>I think this might be a help to you!

I don't think it will.

I've not tried this with Unix but for MSDOS you must specify the database as a separate variable. The syntax is something like

  EXEC SQL connect :userid identified by :password using :connect_string

where my connect_string is t:scosysv:dev . I don't have have the manual so you'll need to check that I've got the syntax right.

Hope this helps

Ian

-- 
--
Ian Dixon                       Email : idixon_at_infocom.co.uk
Reading, England
Received on Sat Aug 14 1993 - 22:23:24 CEST

Original text of this message