Search code examples
delphidbx

How to view the SQL error message in a Delphi's DBX transaction?


I've seen this somewhere in SO some time ago, but I couldn't find it now.

I remember that one of the error events in some component (TSQLDataSet, TDataSetProvider, TClientDataSet or else) would give me the error message as returned by the database server itself, but I cannot recall it.

Does someone knows what I am talking about?

Thanks in advance.


Solution

  • TClientDataSet.OnReconcileError contains a parameter of type EReconcileError which includes the error message, context and code. This data contains the message from the database server.