dbExpress sql error handling

dbExpress sql error handling

Postby Francesco » Mon 17 Oct 2011 09:51

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
Francesco
 
Posts: 9
Joined: Thu 20 Jan 2011 16:33

Postby AlexP » Mon 17 Oct 2011 12:01

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.
AlexP
Devart Team
 
Posts: 5530
Joined: Tue 10 Aug 2010 11:35


Return to dbExpress driver for Oracle