Masterwok
User
 Fresh Boarder
| Posts: 8 |   | Karma: 0 |
|
MySql server is gone and then ...
|
|
Posted: 2007/12/05 14:14 |
|
|
|
|
I made a function testconnection, but sometimes the mysql server is gone, how can i reconnect, this function give sometimes an exception, and crash.
Function TestConnection : Boolean;
Begin
If AdConnection1.Connected Then
result := true
Else
Try
ADConnection1.open;
Result := AdConnection1.Connected;
Except
result := False;
// MessageDlg('no connection', mtError, [mbOK], 0);
End;
End;
|
// i use Delphi7, MySql5, Anyday 1.12.2
|
|