Home » Developer & Programmer » Precompilers, OCI & OCCI » pro*c program,HELP!!!
pro*c program,HELP!!! [message #93653] Fri, 13 September 2002 05:23 Go to next message
strawberry
Messages: 1
Registered: September 2002
Junior Member
I want to connect to ORACLE and write 2 records to the ORACLE DB. After my .pc program being compiled to .c code by pro*c environment, I put it to MSVC6.0 to compile with no problem. But when I run it,two errors occure,it says:

write_to_o3.obj : error LNK2001: unresolved external symbol "void __cdecl sqlerror(void)" (?sqlerror@@YAXXZ)
write_to_o3.obj : error LNK2001: unresolved external symbol _sqlcxt
Debug/write_to_o3.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

From the FAQS I know,maybe orasql.lib should be included into my program, but I cann't find this .lib file in my computer. The oracle Version on my computer is ORACLE8.05.

What can I do next?

Looking forward to your kind reply.
Re: pro*c program,HELP!!! [message #93695 is a reply to message #93653] Wed, 16 October 2002 23:16 Go to previous messageGo to next message
war5ter
Messages: 4
Registered: October 2002
Junior Member
For Oracle 8.0.5, you have to use sqllib8.lib
This will be available in precomp/lib/msvc/ directory
If u use this , then ur problem will be resolved.
Re: pro*c program,HELP!!! [message #93752 is a reply to message #93653] Thu, 19 December 2002 00:16 Go to previous messageGo to next message
shruti
Messages: 9
Registered: December 2002
Junior Member
Are nested select statement allowed in select ?
e.g
EXEC SQL select col1, (select col2 from table2)
from table1

Pro*C throws error for nested sql
Re: pro*c program,HELP!!! [message #93868 is a reply to message #93653] Thu, 27 February 2003 06:32 Go to previous messageGo to next message
vishal anand
Messages: 2
Registered: December 2002
Junior Member
Hi ,
While doing the Update of one table from my Pro *C code , its giving an error ORA -- 1403 no data found.
But the same query executes sucessfully in SQL PLUS. And says zero rows updated .
But I am unable to understand , why is it fetching an ORA--1403 error when i used it in my PRO *C code.
For your reference here is small chunk of PRO *C code that i am tryting to execute , which is fetching an error.

EXEC SQL UPDATE T_CALL_DATAS
SET AMOUNT= 0
WHERE EXT_ID
IN ( SELECT SUBSCR_EXT_ID FROM M_SUBSCRIPTION_EXT_MAPS
WHERE BILL_STATUS = 'N' );

This query returns sqlca.sqlcode =1403 ;
But the same query executes succesfully when i do so in sqlplus. It gives zero rows updated as no rows are required to be updated.
Is there any problem with the query that i have written in Pro*C ?Or do i have to capture some exception in my Pro *C code.

Any help would be appreciated,
Thanks ,
Vishal
Re: pro*c program,HELP!!! [message #93910 is a reply to message #93695] Tue, 25 March 2003 02:42 Go to previous messageGo to next message
Kumar
Messages: 115
Registered: December 1998
Senior Member
Dear guys..

i have made all the changes whatever u told in the discussion form.. still its not working. Please guys tell the correct answer or tell the sequence to get the code to work
Re: pro*c program,HELP!!! [message #94068 is a reply to message #93910] Mon, 22 December 2003 17:53 Go to previous messageGo to next message
kaushikram
Messages: 1
Registered: December 2003
Junior Member
Hi ,
i am also facing the same problem. could be plz tell me how to resolve it if u had found the problem
Re: pro*c program,HELP! [message #94114 is a reply to message #93752] Mon, 01 March 2004 03:19 Go to previous messageGo to next message
Mitesh K. Patel
Messages: 4
Registered: March 2004
Junior Member
hey shruti, well sorry i am asking help to u in turn not providing u help, well see i also want to connect oracle using C, but i do not have the pro*c compiler but it seems that u have used a pro*c compiler, is it? if so then please send me the pro*c compiler and the help about how to use it because i am in desparate need of it , PLEASE DO ME THIS FAVOUR DEAR

my mail address : mitesh_26@hotmail.com
Re: pro*c program,HELP! [message #94199 is a reply to message #94068] Wed, 05 May 2004 20:38 Go to previous message
babor
Messages: 1
Registered: May 2004
Junior Member
how can i open a bmp/jpg file from specified directory
and do graphical work to that bmp/jpg file
Previous Topic: problem in compiling pro*c code
Next Topic: Pro*C Help
Goto Forum:
  


Current Time: Sat Apr 20 09:48:15 CDT 2024