Problem with TZConnection.PingServer

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

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
zitoune
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 27.03.2008, 12:37

Problem with TZConnection.PingServer

Post by zitoune »

Hi,
I'm new on this forum, and I use ZeosLib (6.6.1-geta and 6.6.2 rc) with a Delphi application and PostgreSQL database. I wish test my connection to the server with the function "PingServer" of my TZConnection variable. But when I call it, I have an error exception : "Unsupported operation"...

Can somebody help me please?

Olivier
You do not have the required permissions to view the files attached to this post.
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Hi Olivier,

It means : the ping operation is not (yet?) supported for PostgreSQL. Only for mysql at the moment. If you have some experience in programming using the PG dll's directly, you can certainly help us implementing this.

Main purpose of the function : If you have a connection to the server and you want to be sure the server is still there before triggering some new database actions (eg a refresh after the program was idle for some time), you can call PingServer. If this function returns true you can go on. If not, you should try to reconnect or close your connection.
For mysql ping also tries to reconnect before returning. This comes in very handy when there was just some small (network?) problem that caused the server to be unavailable for some time. But I don't know if this is possible for other database implementations.

Mark
Image
Post Reply