Re: Problem with database drop connection
- From: "Steve Zimmelman" <skz@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 8 Sep 2006 08:48:33 -0500
You didn't mention what DB you are using. We had the same problem using MS SQL
Server. From our tests it appeared to be SQL Server terminating a connection
that hadn't been used in a while. To resolve the issue, we sub-classed the ADO
Connection and used a timer to sort of "ping" the server to keep the connection
alive.
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:450068dc@xxxxxxxxxxxxxxxxxxxxxxxxx
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?
.
- References:
- Problem with database drop connection
- From: Gerhard Venter
- Problem with database drop connection
- Prev by Date: Problem in D2006 from D7
- Next by Date: Re: Connection terminated by server problem
- Previous by thread: Problem with database drop connection
- Next by thread: Problem in D2006 from D7
- Index(es):
Relevant Pages
|