Subject RE: [IBO] Commit-error: showing the statement / record, which is causing the error
Author IBO Support List
Hi Patrick,
 
Unfortunately, there isn't a way that I know of to try and pinpoint which statement contributed the offending problem that doesn't show up until you attempt to commit. You would have to try and decipher this all on your own by keeping a log of statements for that transaction and then resubmitting them with the hoped for correction. You would have to repeat this over and over until you were able to get something to succeed.
 
Hope this is somewhat helpful.
 
Kind regards,
Jason Wharton
 


From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]
Sent: Monday, December 29, 2014 7:28 AM
To: IBObjects@yahoogroups.com
Subject: [IBO] Commit-error: showing the statement / record, which is causing the error

Hello,

I'm working on some import functionality and prepare an IB_Script with all the required statements which gets executed at the end. The progress and also the errors shall be logged.

Some errors like not matching column count etc. do occur on execute of the script already and it's possible to access the error causing statement with the help of the IB_Script.OnStatement event.

Some other errors occur only during the commit (for instance violations of foreign key constraints) is there a way to access not only the general errormessage, but also the SQL statement causing the error?  I.e. the statement / the recod with the wrong value.

IB_Transaction.Statements seem to differ from the statements of the IB_Script and other than that I don't see anything, which might help to achieve this.


Best regards,

Patrick