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
Problem with TZConnection.PingServer
Moderators: gto, cipto_kh, EgonHugeist
Problem with TZConnection.PingServer
You do not have the required permissions to view the files attached to this post.
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
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
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