With MYSQL_OPT_RECONNECT=1 provided code works like expected<br><br><div class="gmail_quote">2012/12/5 <span dir="ltr"><<a href="mailto:michael.vancanneyt@wisa.be" target="_blank">michael.vancanneyt@wisa.be</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
<br>
On Wed, 5 Dec 2012, Andrey Smyntyna wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello.<br>
<br>
I need some explanation of how to do persistent connection to MySQL<br>
database and restore it if it has broken.<br>
<br>
In my test project I have created TMySQL51Connection component with<br>
KeepConnection property set to True<br>
and additionaly before making any database operations I check connection<br>
availability like below:<br>
<br>
if not dm.mysql.Connected then<br>
dm.mysql.Connected := True;<br>
<br>
But sometimes I anyway get connection error with the fact that MySQL server<br>
is present and available in network.<br>
</blockquote>
<br></div></div>
As far as I know, the 'Keepconnection' is not functional.<br>
<br>
Michael.<br>
<br>
--<br>
______________________________<u></u>_________________<br>
Lazarus mailing list<br>
<a href="mailto:Lazarus@lists.lazarus.freepascal.org" target="_blank">Lazarus@lists.lazarus.<u></u>freepascal.org</a><br>
<a href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus" target="_blank">http://lists.lazarus.<u></u>freepascal.org/mailman/<u></u>listinfo/lazarus</a><br>
</blockquote></div><br>