FileMan Delphi Components/TFMAccess ErrorList
From VistApedia
Jump to navigationJump to search
ErrorList Property (Run-time Only)
See Also
Example Code
procedure TForm1.Button1Click(Sender: TObject);
var i:integer;
fatal: boolean;
err: TFMErrorObj;
begin
fatal:=False;
FMGets1.GetData;
if FMGets1.ErrorList.Count>0 then
{display errors to the user}
FMGets1.DisplayErrors;
{loop through list of error objects}
for i:=0 to (FMGets1.ErrorList.Count-1) do
begin
err:= FMGets1.ErrorList.Items[i];
if err.ErrorNumber='601' then fatal:=True;
end;
if not fatal then
{continue...}
end;
Applies To
TFMAccess, all VA FileMan data access components
Declaration
property ErrorList : TList;
Description
A TList of TFMErrorObj objects. This TList is populated if the VA FileMan data access component encounters one or more VA FileMan errors during a server call.
Data access components automatically clear their ErrorList property immediately before making any server call. After a server call, you can:
- Check the TList Count property of the ErrorList to see how many errors occurred.
- Use the DisplayErrors method to display errors to the user.
- Loop through the TFMErrorObj objects in the ErrorList after a call, if you need to branch based on the presence of a particular error.