GaryButcher
Programmer
Hi
I'm using ADOExpress with D5. I want to capture ADO errors in (for example) the OnDeleteError event of TADOTable. This event receives the EDatabaseError object. I want to query this to find out what caused the error but the only way I can find of doing this is to check the text in the error message for certain key phrases. Is there a way that I can find out the underlying error number? I want to do something like...
procedure TfrmMyForm.tblMyTableDeleteError(DataSet: TDataSet;
E: EDatabaseError; var Action: TDataAction);
begin
Action := daAbort;
if (E is EADOError) then
// check the ADO error number and handle it accordingly //;
end;
Your help gratefully received.
Gary
I'm using ADOExpress with D5. I want to capture ADO errors in (for example) the OnDeleteError event of TADOTable. This event receives the EDatabaseError object. I want to query this to find out what caused the error but the only way I can find of doing this is to check the text in the error message for certain key phrases. Is there a way that I can find out the underlying error number? I want to do something like...
procedure TfrmMyForm.tblMyTableDeleteError(DataSet: TDataSet;
E: EDatabaseError; var Action: TDataAction);
begin
Action := daAbort;
if (E is EADOError) then
// check the ADO error number and handle it accordingly //;
end;
Your help gratefully received.
Gary