Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with EDatabaseError object

Status
Not open for further replies.

GaryButcher

Programmer
May 5, 2002
1
GB
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top