Page 1 of 1

OnError - IB/FB

Posted: Wed 18 Jun 2008 08:54
by progman
I use FireBird. I see that TUniConnection use SQL Error Codes -803, -104 .... but they no precise for me. If it possible to access in OnError event to full GDSErrorCode ?

Posted: Wed 18 Jun 2008 10:59
by Challenger
There is a bug with the TUniConnection.OnError event. Now this event receives the internal exception instead of EUniError. We will fix this bug in the next build of UniDAC.
Now you can add IBCErrorUni (UniDAC Pro) or IBCError (UniDAC Std) unit to uses clause and use the following code:

Code: Select all

(E as EIBCError).ErrorNumber
And in the next build you will have to modify this code:

Code: Select all

((E as EUniError).InnerError as EIBCError).ErrorNumber