Re: ? Trapping 'RAISE EXEPTION' in Informix stored procedures & Delphi 3 C/S
Posted in 1998
Ivan Lyakhovenko wrote in message <01bd94e8$36874480$59b1e2c2@van.xtech.ru>... >Hi Dennis! > >I have the same problem with D3 C/S& Informix 6.0. And this problem >is quite serious for me too. I found that in the first case when >exception occures, SQLCA.SqlCode has correct error number. But when >your SP returns value(s) this field is always ZERO. I believe that >this is the problem source. I don't know either this is BDE problem >or I-Connect problem. I'm too lazy to write ESQL/C program to check >this. Ivan, I beg to differ. When executing the SP and viewing SQL monitor, SQL Monitor does refelct the return of an error. Look at lines 18 & 19 below (excert from SQL Monitor). From this, Delphi DOES know there is an error. Running the application in debug mode, also raises an exception, which Delphi IDE does respond to, but running the application from the command line, that's a nother story. Dennis 1 18:24:50 SQL Prepare: INFORMIX - execute procedure sp_mams_xaction() 2 18:24:50 SQL Vendor: ESQL/C SetConnect 3 18:24:50 SQL Vendor: ESQL/C Prepare Statement 4 18:24:50 SQL Vendor: ESQL/C Describe Statement 5 18:24:50 SQL Stmt: INFORMIX - XACT Commit 6 18:24:50 SQL Vendor: ESQL/C SetConnect 7 18:24:50 SQL Vendor: ESQL/C Commit Work 8 18:24:50 SQL Execute: INFORMIX - execute procedure sp_mams_xaction() 9 18:24:50 SQL Vendor: ESQL/C SetConnect 10 18:24:50 SQL Vendor: ESQL/C Declare Cursor 11 18:24:50 SQL Vendor: ESQL/C Open Cursor 12 18:24:50 SQL Stmt: INFORMIX - Fetch 13 18:24:50 SQL Vendor: ESQL/C SetConnect 14 18:24:50 SQL Vendor: ESQL/C Fetch 15 18:24:50 SQL Vendor: ESQL/C GetErrorMessage 16 18:24:50 SQL Error: INFORMIX - test():10|failed to search 17 18:24:50 SQL Error: INFORMIX - Unmapped SQL Error Code: -746 18 18:24:50 SQL Stmt: INFORMIX - ERROR 19 18:24:50 SQL Stmt: INFORMIX - Reset 20 18:24:50 SQL Vendor: ESQL/C SetConnect 21 18:24:50 SQL Vendor: ESQL/C Close Cursor 22 18:24:50 SQL Vendor: ESQL/C Free Cursor 23 18:24:50 SQL Data In: INFORMIX - Rows affected = 0