|
AnyDAC
|
EADDBEngineException is the base exception class for all AnyDAC DBMS related errors.
uADStanError
An EDBEngineException object is used as:
Its Errors property contains TADDBError objects. Each of them corresponds to a single error, warning or message item, produced inside of a single DBMS operation. The Kind property returns DBMS-independent error kind. The SQL and Params properties allows to get a failed SQL command.
All AnyDAC drivers are implementing own EADDBEngineException descendant classes. For example, MySQL driver implements EMySQLNativeException exception class.
Use a TADGUIxErrorDialog dialog to display the complete information about AnyDAC / DBMS error.
EADDBEngineException = class(EADException);
uses uADStanError; ...... try ADQuery1.ExecSQL; except on E: EADDBEngineException do if E.Kind = ekUKViolated then begin ShowMessage('The record must be unique'); Abort; end; end;
|
What do you think about this topic? Send feedback!
|