Re: Connection terminated by server problem



Here's what we came up with.
http://www.skzimmelman.com/Articles/skzADOConnKeepAlive.html

It's been live in an enterprise company for about a year.

-Steve-

"Gerhard Venter" <IeatSpam4breakfast@xxxxxxxx> wrote in message
news:450068da$1@xxxxxxxxxxxxxxxxxxxxxxxxx
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

  • 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)
  • Interesting Problem regarding Parameters
    ... My company is currently migrating to .Net from PHP for a number of reasons, ... database connection object. ... What our current database class will do (after executing the query) is logg ... //Set the query with parmater then execute reader ...
    (microsoft.public.dotnet.framework.adonet)
  • 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)
  • 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)
  • Re: Lost connection
    ... therefore is not possible to handle every query. ... connection problems and sort them out. ... disable the beforeExecute event handler by setting the event to nil; ... try to execute a small dummy query something like ...
    (borland.public.delphi.database.ado)