Page 1 of 1

resume broken connection

Posted: 29.09.2005, 13:15
by guyvdb
Hi,

We have a customer who uses a wireless laptop in combination with
our application.
Sometimes the connection is broken, and the program crashes.
Is there a manner to resume the connection automatically without
crashing the program?

We are using delphi 7 sp 1, zeoslib 6.5.1, sql server 2000 sp4 and dblib.


Thanks.

Posted: 30.09.2005, 06:06
by fduenas
i think this is one function that should be implmeneted by zeoslib. Also the driver should support keep alive connections or a function to keep the conenction alive.

If you can do a research for that function in Dblib this could help Zeos developer Team members to implement the function in correct the Driver class

Maybe this can be a Feature request. post it on SF site

Posted: 10.10.2005, 08:03
by klchin
Hi,

I having the similar problem, only it was under the internet enviroment.

I would like to know under which event it will be trigger?
Or which function to determine the connection was disconnect
before starting query Open or Exec?

I try to catch the exeception, and used back the connection
from the TZQuery, but it failed with more errors.

Regards
KL Chin

Posted: 12.10.2005, 22:40
by zippo
I Solved the problem with a timer and a simple function like "Select 1... :wink: . Not very clean, but Iwas in hurry,

Posted: 13.10.2005, 03:00
by klchin
Hi,

BTW, instead of using "Open" or "Exec"to find-out to find
out the connection was broken, any other method?

Regards
KL Chin

Posted: 13.10.2005, 16:54
by fduenas
For msyql there is a PING function in the api plain driver

Posted: 14.10.2005, 03:55
by klchin
Hi,

Any general API for all kind of SQL server?

Regards,
KL Chin

Posted: 20.07.2007, 16:00
by sf
Hi...

I have exactly the same problem KL Chin has... happens with sql server too.

I am using version 6.6.1 - beta.

Any solution to this problem so far?

Regards!

Posted: 21.07.2007, 08:24
by klchin
Hi,

I did not have a solution, current I just a capture the
exceptional, if the error occured due to connection then
reconnect the connection and re-exec the SQL,
in short all SQL's open or exec will call a function instead
a Zeos method directly, by passing the TZquery and
TZConnection.

Hope this information can help you.

Regards,
KL Chin

Posted: 23.07.2007, 12:58
by sf
Thanks KL Chin... this is similar to what I am doing to work around the problem too.

Regards.