AnyDAC
ContentsIndexHome
PreviousUpNext
EADDBEngineException.Errors Property

Lists the entire AnyDAC / DBMS error, warning or message collection.

Group
Links

Use Errors to read TADDBError objects. 

Each object corresponds to an error, warning or message returned by a DBMS. In many cases there will be only single object. although some DBMS's, like a Microsoft SQL Server, may return few messages. 

The first error has an index value of 0. The last error has an index value of ErrorCount-1. The property is default array property. So, you can avoid it.

property Errors [Index: Integer]: TADDBError;
try
   ADQuery1.ExecSQL;
except
  on E: EADDBEngineException do
    for i := 0 to E.ErrorCount - 1 do
      Memo1.Lines.Add(E[i].Message);
end;
What do you think about this topic? Send feedback!