Connection terminated by server problem



I have found something strange. I have an ADOConnection component that
before I execute a query check if it is still connected. Well when the
database terminates abnormal or is stopped or for what ever reason, when I
read the connected property of the ADOConnection it still shows
connected=true and then only when I executes the query I get the
"Communication link failure: Connection was terminated" error. But I need to
know even before I execute or better trap it when it happens.

How can I trap that kind of disconnects with ADOConnection?


.



Relevant Pages

  • [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)
  • 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: ADODB Command memory leak
    ... _ConnectionPtr conn = NULL; ... // Execute statement. ... > My logic is such that the connection to the database is not maintained ... Create/Append command parameters ...
    (microsoft.public.data.ado)
  • Re: Script Controlled Dynamic Task Execution
    ... My package had three connections to three ... and each had a transformation for itself. ... After posting, I just created three packages for each connection, and my ... >> need to execute one transformation on a text file, ...
    (microsoft.public.sqlserver.dts)
  • Re: Interesting Problem regarding Parameters
    ... > reasons, however we have one slight problem we would very much like to ... > logging to our database connection object. ... > query that was actually executed on the server, what I mean by that is: ... > //Set the query with parmater then execute reader ...
    (microsoft.public.dotnet.framework.adonet)