Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> SQLCA Problem
Hello,
I am writing a DLL that talks to oracle. Everything works except for the
return code of sqlca.sqlcode.
I have #include <sqlca.h> the DLL compiles, connects to oracle gets the data
and returns, but if there
is an oracle problem I would like to have the error code to return back to
the calling program.
Another interesting thing is that the sqlca.sqlerrm.sqlerrmc gives, the correct error oracle error in the string and the correct message that is associated with that error. Its just the sqlca.sqlcode that gives me a incorrect return value. The return value of sqlca.sqlerror is 1405 and the value of sqlca.sqlerrm.sqlerrmc is ora-01403 NO DATA FOUND. sqlca.sqlerror should be 1403, not 1405.
I have tried to reset the sqlca.sqlerror with exec sql whenever sql error continue just before the call to oracle. Also, the DLL is calling a stored package in the database. I am only calling one function within the dll, so there is no possibility of unknown side effects from something else in the program. I have also tried using the exception handling "when others" within the package to return the sqlcode back through in out parameters and the number that is returned is different from the variables within the sqlca in the pro*c program.
any help would be appreciated.
--pnh Received on Wed Jan 27 1999 - 13:55:14 CST
![]() |
![]() |