resume broken connection

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
guyvdb
Fresh Boarder
Fresh Boarder
Posts: 20
Joined: 23.08.2005, 07:54

resume broken connection

Post 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.
User avatar
fduenas
Zeos Dev Team
Zeos Dev Team
Posts: 132
Joined: 26.08.2005, 08:12
Location: Cancún

Post 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
klchin
Senior Boarder
Senior Boarder
Posts: 65
Joined: 02.09.2005, 06:27

Post 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
zippo
Silver Boarder
Silver Boarder
Posts: 322
Joined: 12.10.2005, 18:01
Location: Slovenia

Post by zippo »

I Solved the problem with a timer and a simple function like "Select 1... :wink: . Not very clean, but Iwas in hurry,
klchin
Senior Boarder
Senior Boarder
Posts: 65
Joined: 02.09.2005, 06:27

Post 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
User avatar
fduenas
Zeos Dev Team
Zeos Dev Team
Posts: 132
Joined: 26.08.2005, 08:12
Location: Cancún

Post by fduenas »

For msyql there is a PING function in the api plain driver
klchin
Senior Boarder
Senior Boarder
Posts: 65
Joined: 02.09.2005, 06:27

Post by klchin »

Hi,

Any general API for all kind of SQL server?

Regards,
KL Chin
sf
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 20.07.2007, 15:48

Post 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!
klchin
Senior Boarder
Senior Boarder
Posts: 65
Joined: 02.09.2005, 06:27

Post 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
sf
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 20.07.2007, 15:48

Post by sf »

Thanks KL Chin... this is similar to what I am doing to work around the problem too.

Regards.
Post Reply