Re: Connection terminated by server problem
- From: "Jackson Gomes - Tools&Comps" <jackson@xxxxxxxxxxxxxxxxx>
- Date: Thu, 7 Sep 2006 21:31:06 -0300
when I read the connected property of the ADOConnection it still showsto
connected=true and then only when I executes the query I get the
"Communication link failure: Connection was terminated" error. But I need
know even before I execute or better trap it when it happens.
How can I trap that kind of disconnects with ADOConnection?
This seems to be a problem with ADO. You can't know if your connection is
alive until you try to access the database as you did. The solution we
recently implemented in a app was to use a TTimer and fire a inofensive SQL
to the DB. If there is a connection failure, you need to set the Connected
property to False manually and them try to reconnected.
Regards
--
Jackson Gomes
Tools&Comps - Security Components for Borland Developers.
Web Site: http://www.toolsandcomps.com
Our Forum: http://groups.yahoo.com/group/toolsandcomps
e-mail: jackson@xxxxxxxxxxxxxxxxx
Phone: 55 31 38494946
.
- References:
- Connection terminated by server problem
- From: Gerhard Venter
- Connection terminated by server problem
- Prev by Date: Problem with database drop connection
- Next by Date: Re: Problem with MS SQL and ADO
- Previous by thread: Connection terminated by server problem
- Next by thread: Re: Connection terminated by server problem
- Index(es):
Relevant Pages
|