Problem with database drop connection



I have an ADOConnection that I check if it is still connected before I
execute a query. Well if the database drops the connection for whatever
reason, I found that when I check the connected property of the connection
it still shows Connected=True. I only get the message"Communication link
failure: Connection was terminated" once I execute the query but I need to
know before I execute or better when it actually happens so I can trap for
that.

Anybody know how to trap for disconnects initiated by the server side?


.



Relevant Pages

  • Re: PEAR MDB2 Unknown Error
    ... I'm bumping into an issue with my installation of the MDB2 package ... I'm trying to execute a query, ... is created in the parent class' constructor and a connection *is* ... I just can't seem to query against it. ...
    (comp.lang.php)
  • [Full-Disclosure] Advanced usage of system() function.
    ... and call its arguments as a command for shell. ... as we can see we still didnt get what we want (typing exit ... Connection closed by foreign host. ... think what we want to execute. ...
    (Full-Disclosure)
  • RE: stored proc ansi_nulls help
    ... on connection which execute your SP. ... > Heterogeneous queries require the ANSI_NULLS and ANSI_WARNINGS options to be set for the connection. ... Enable these options and then reissue your query. ... > I put the ansi nulls and ansi warnings in when building the proc but am still recieving the error. ...
    (microsoft.public.sqlserver.programming)
  • Advanced usage of system() function.
    ... and call its arguments as a command for shell. ... as we can see we still didnt get what we want (typing exit we are ... Connection closed by foreign host. ... think what we want to execute. ...
    (Bugtraq)
  • Re: Connection terminated by server problem
    ... execute a query check if it is still connected. ... Connection was terminated" error. ... How can I trap that kind of disconnects with ADOConnection? ...
    (borland.public.delphi.database.ado)