[VSRV][V4RB] connection status

Tim Davis timdavis at amug.org
Mon Sep 1 08:11:59 CDT 2003


Hi Ruslan,

>> Before each database action I ask db.IsOpen, if
>> false call db.Open, then continue the action.
>
> I wonder...if do this BEFORE EACH operation, then
> Check of connection must be very fast operation!

Definitely!

Here are a couple other ideas (not necessarily as a replacement for 
server IsOpen) that would be even faster. You may not like them, I'm 
just thinking of speed.

1. The server "tells" the client it is disconnected (or will be), and 
the client retains the boolean property, or reconnects immediately.

2. The server simply "reconnects" on new requests after timeout. (Then 
of course what might be the advantage of timing out? ... )

The disadvantage of IsOpen is the client needs to ask every time prior 
to a database activity. But it is better than the action failing due to 
timeout. The second idea above avoids this repetitive line of code and 
requests to the server.

Thanks,
Tim Davis



More information about the Valentina mailing list