Diman
Admin
 Admin
| Posts: 1461 |  | Karma: 18 |
|
Re:How to solve DB Connection Monitoring
|
|
Posted: 2007/06/29 05:28 |
|
|
|
|
You can try following:
1) If there is not a big workload on the server, then just set TTDADODriver.Pooled = False.
2) In TTDADODriver.AfterGetDataSet event hanlder you can verify current connection state and if required, then reestablish it:
if not CheckReallyConnected(TADOQuery(ADataSet).Connection) then begin
TADOQuery(ADataSet).Connection.Connected := False;
TADOQuery(ADataSet).Connection.Connected := True;
end;
|
There CheckReallyConnected will be your own function, checking ADO connection state.
Rgards,
Dmitry
|
|