-
Sekhar Chitta
- PowerBuilder
- Thursday, 1 May 2025 04:32 AM UTC
We are connecting Powerbuilder 17 app to SQL server through ODBC using the native SQL server ODBC driver. We send batch sql statements to the sql server. The batch statements are mainly execute procedure and checking the success or failure of the procedure return codes. If there's error, I use RAISEERROR to send back error code to Powerbuilder. We have error handling in Powerbuilder again that checks the sqlca.sqlcode for the success or failure and then commit or rollback as the case may be.
I'm having a situation where sql server is returning an error code and I can see it in the sql profiler trace. However, the sqlca.sqlcode and sqlca.sqldbcode both show 0. They aren't capturing the error code returned from the sql server. Because of this, the code is trying to commit when infact it should rollback. This is causing partial data to be commited.
Any ideas as to why sqlcode and sqldbcode show 0, even though sql server returning error code?
Regards,
Sekhar
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.