Page 1 of 1

dbExpress sql error handling

Posted: Mon 17 Oct 2011 09:51
by Francesco
Hello,

I am translating an application from bde to dbxpress. I have to catch a specific exception, in BDE it was:

Code: Select all

E : EDBEngineError;
...
if E.Errors[I].NativeError = 20111 then
...
I guess if there is some component similar to EDBEngineError in dbExpress. I am searching for a workaround with no success. I am using Delphi7, Oracle 11g, Windows Vista and dbexpoda.dll. Thankyou.

Francesco

Posted: Mon 17 Oct 2011 12:01
by AlexP
Hello,

You can use the EDatabaseError class in Delphi 7, but you will not be able to get the error code, because dbExpress does not support this feature before Delphi 2007. Starting from Delphi 2007, the TDBXError class from the DBXCommon module is used for these purposes.