Firebird - Lazarus catch EDatabaseError not EIBSDatabaseError lazarus / 16-Databases ---------------------------------------------------------------------- Lesle · 2011-11-23 22:15 I have installed lazarus-0.9.30-fpc-2.4.2-win32 and Firebird 2.5.1 on Windows 7 64bit I build simple Form with IBConnection , ... , SQLQuery. On Form I have DBEdit Fields connected via SQLQuery to one of my table in Firebird. When I try insert/update data and not fill all required fields I receive exception but not EIBDatabaseError but  EDatabaseError . This means I have only message, no Firebird error code I would like to translate message but when I dont have Firebird error code I don't have possibility to do it simple. Any idea why I dont receive EIBDatabaseError but EDatabaseError? ---------------------------------------------------------------------- BigChimp · 2011-11-23 22:21 Nope, I remember FPC 64 bit incorrectly catches errors that the Firebird database client code should handle: http://bugs.freepascal.org/view.php?id=17360 On 32 bit FPC, it works, according to that bug report... Apart from that, I don't know of any problems with Firebird error codes... ---------------------------------------------------------------------- Lesle · 2011-11-23 22:25 I had run compiled on Win7 64 bit Lazarus program on win32 but result was the same. You think it could be it was compiled on win 64bit? ---------------------------------------------------------------------- BigChimp · 2011-11-24 04:50 If the program ran unchanged on Win32 it must have been compiled for 32 bit - Win64 can run 64 and 32 bit executables; Win32 can run 32 bit (and 16, IIRC  )... I was thinking about the order that you handle exceptions (first the Firebird, then general db or the other way round) and it seems that makes a difference. I'm assuming you're testing for the Firebird error first? Perhaps show a code snippet? ---------------------------------------------------------------------- Lacak2 · 2011-11-24 07:11 Quote from: Lesle on November 23, 2011, 11:15:35 pmWhen I try insert/update data and not fill all required fields I receive exception but not EIBDatabaseError but  EDatabaseError . ... Any idea why I dont receive EIBDatabaseError but EDatabaseError? Because Required fields are checked at TDataSet level in procedure TDataSet.InternalPost; (at client - FPC side ... so error is not returned by server ... so no IB error code there) And this is TSQLConnector independent code, so there is raised generic EDatabaseError ---------------------------------------------------------------------- Lesle · 2011-11-24 08:55 Lacak2 you have right. I get to that yesterday night . If I made SqlQuery.Prepare then I received EIBDatabaseError but doing only SqlQuery.ApplyUpdates I receive EDatabaseError. Knowing that, any sugestion how to check what EDatabaseError is throw to translate it into other language? Is there any error code of EDatabaseError like in EIBDatabaseError? ---------------------------------------------------------------------- Lacak2 · 2011-11-24 12:20 Quote from: Lesle on November 24, 2011, 09:55:33 amIs there any error code of EDatabaseError like in EIBDatabaseError? AFAIK no