Re: Lost connection



On Jun 28, 1:01 am, "Arjan de Haan \(ha\)" <2x nospam nospam adwhaan
AT hotpop.com> wrote:
"Shaolin" <milos.kl...@xxxxxxxxx> schreef in berichtnews:468277c6@xxxxxxxxxxxxxxxxxxxxxxxxx

Sorry I forgot notice that I don't want use try except block. I want to
detect this disconnection using some ado function or property or another way.

Hm. ADO does not recognize the disconnection from the database until it tries to talk to
it - when executing queries, for example. Not sure if there are any special functions to
call in order to detect the disconnect.
One way of detecting it would be to 'ping' the IP address (assuming you can reach the
server by TCP/IP) and set a flag if the server does not respond in time.

But why refrain from using exceptions? This sort of situations are what try...except
blocks are designed for.
In the last data access layer I wrote I too needed to cater for losing connections due to
mobile Windows Embedded stations which could move out of the wireless network range for
short periods. I resolved it nicely using exception handling. The applications just
execute queries and when the connection has been lost, in the background there are several
attempts made to reconnect - all without the front end even knowing. It only takes longer
to get the data or possible receive an error that the database can't be reached now. When
they move within network range, all the operators need to do is refresh or refire the
query they were trying to execute and the connection is reestablished. Works like a
charm - and with exception handling....

...Arjan...

i think u can handle the error raised from onwillexecute of
tadoconnection

.



Relevant Pages

  • Re: Lost connection
    ... detect this disconnection using some ado function or property or another way. ... ADO does not recognize the disconnection from the database until it tries to talk to ... query they were trying to execute and the connection is reestablished. ...
    (borland.public.delphi.database.ado)
  • Re: Party customer service. Read on
    ... We have done a complete check of our server logs and the connection status prevailing at the time you reported the problem and we do not see any disconnection issue rising from our end. ... Please note that you have faced this problem as you were disconnected from the game. ... The connection between your computer and our servers is established through several other intermediate servers and your service provider decides the path taken by the connection. ...
    (rec.gambling.poker)
  • Re: Effectiveness of Severing Network Connection to Protect a Computer From Attack
    ... >network icon in the task bar), is this just as good as physically breaking ... >the network) despite the network connection being cancelled. ... As stated in the other posts, logical disconnection will protect you ...
    (microsoft.public.win2000.security)
  • Re: Regular Drop Connection Problem
    ... > be able to check their logs and see what caused the disconnection. ... The technicians definitely have log access, I'm told as much that the ... connection and disconnection event. ... > the demarc to the splitter and from the splitter to the DSL modem ...
    (comp.dcom.xdsl)
  • Re: Loss of Connectivity on Only One PC on a LAN
    ... I use a LAN connection which consists of two PCs each connected to a Linksys BEFSR 41 Router. ... At this point I need to unplug modem and router and replug them as described above. ... A periodic disconnection, repaired by physically disconnecting the modem ...
    (microsoft.public.windowsxp.network_web)