in TMyConnnection i set the event OnError:
Code: Select all
if E.ErrorCode = 2003 then begin
Fail := False;
ShowMessage( 'The Application can not connect to mySQL Server, press "OK" and try later..' );
end else
Fail := True;
i made a small project for this..
http://www.drdsistemas.com.br/util/Error.7z
thank's