Delphi Connection Failure. How to stop message?
Posted on 2007-03-26
I'm trying to trap ADO errors in Delphi 7. If I stop my SQL server or disconnect the network cable and run a query I get the error "Connection Failure".
I would like to stop this error from being displayed to the user and handle it internally like so....
procedure TForm1.ADOConnection1ExecuteComplete(Connection: TADOConnection;
RecordsAffected: Integer; const Error: Error;
var EventStatus: TEventStatus; const Command: _Command;
const Recordset: _Recordset);
If EventStatus = esErrorsOccured Then
ShowMessage('show custom error.');
So I can trap that an error has occured but I can't stop the application showing the ADO message of "Connection Failure"
How do I stop this error showing to the user?