Hello!
Is there any autoreconnect possibility in zeos?
I often have the problem that my mysql server is unaivailabe for a
few seconce and then i get an error message in the Programm.
Bye Sven Lehnert
autoreconnect Feature ??
Moderators: gto, cipto_kh, EgonHugeist
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
Did you try the TZconnection.ping method? Automatic reconnect on every database access is not available in Zeoslib, however mysql provides the MYSQL_OPT_RECONNECT connection option. We did not provide a way to enable it yet. Would you try to change TZMySQLConnection.Open function to enable it and test? This may do the trick: (NOT TESTED)
If this works we can add it to the next release.
When your sever has gone away with open resultsets there's also the brand new Reconnect function which does not close all datasets (as would happen with an disconnect/connect sequence).
MArk
Code: Select all
if StrToBoolEx(Info.Values['MYSQL_OPT_RECONNECT']) then
FPlainDriver.SetOptions(FHandle, MYSQL_OPT_RECONNECT, nil);
When your sever has gone away with open resultsets there's also the brand new Reconnect function which does not close all datasets (as would happen with an disconnect/connect sequence).
MArk