So zeigen Sie die SQL-Fehlermeldung in der DBX-Transaktion von Delphi an?
Frage
Ich habe das schon mal irgendwo gesehen, aber ich konnte es jetzt nicht finden.
Ich erinnere mich daran, dass einer der Fehlerereignisse in einiger Komponente (TSQLDATASET, TDATASETPROVIDER, TCLIENTATASET, TDATASETPROVIDER, TCLIENTDATASET oder ELSE) die Fehlermeldung wie vom Datenbankserver selbst zurückgibt, aber ich kann es nicht erinnern.
weiß jemand, worüber ich spreche?
Vielen Dank im Voraus.
Lösung
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.
Andere Tipps
Of course EReconcileError only helps if that is the particular type of database error you have. For all errors first look at the E.Messaage string, which gives you a description of the problem. Not always the same as the exact server text i think - it dpends also which database driver you are using - I am more familiar with the TMySQLConnection, but it's still a DBExpress driver... Chris