Connect Error using PRO*C Code [message #93986] |
Wed, 02 July 2003 02:21 |
Matt Robinson
Messages: 3 Registered: July 2003
|
Junior Member |
|
|
Hello everyone.
!!HELP ME PLEASE!!?!!
I am getting errors when trying to run a C program generated by proc for Oracle 8i version 8.1.7 on Redhat Linux 6.2.
The database is on a remote server. It is version 8.0.4. tnsping and sqlplus sessions connect OK and I can query the database with no problems.
The .pc program uses EXEC SQL CONNECT :connstring; and connstring contains the connect request in the form (userid)/(password)@(TNSName).
The (TNSName) is correctly defined in the tnsnames.ora file found in /u01/app/oracle/product/8.1.7/network/admin/tnsnames.ora and /u01/app/oracle/product/8.1.7/hs/admin/tnsnames.ora on my system.
Setting TNS_ADMIN has no effect.
I can use the *exact* same connection string as a commandline argument to sqplus and it works fine. When I run my C program, however, the connect request fails with error [[Connect error]] Error while trying to retrieve text for error ORA-12514.
Error ORA-12514 means cannot resolve the TNS Name.
I compiled my C code with this library: -lclntsh
Are these libraries correct? Have I missed something?
Can anyone help?
|
|
|