[Lazarus] TMySQL51Connection: Keep connection alive
Andrey Smyntyna
andreysmyntyna at gmail.com
Tue Dec 11 09:11:19 CET 2012
With MYSQL_OPT_RECONNECT=1 provided code works like expected
2012/12/5 <michael.vancanneyt at wisa.be>
>
>
> On Wed, 5 Dec 2012, Andrey Smyntyna wrote:
>
> Hello.
>>
>> I need some explanation of how to do persistent connection to MySQL
>> database and restore it if it has broken.
>>
>> In my test project I have created TMySQL51Connection component with
>> KeepConnection property set to True
>> and additionaly before making any database operations I check connection
>> availability like below:
>>
>> if not dm.mysql.Connected then
>> dm.mysql.Connected := True;
>>
>> But sometimes I anyway get connection error with the fact that MySQL
>> server
>> is present and available in network.
>>
>
> As far as I know, the 'Keepconnection' is not functional.
>
> Michael.
>
> --
> ______________________________**_________________
> Lazarus mailing list
> Lazarus at lists.lazarus.**freepascal.org<Lazarus at lists.lazarus.freepascal.org>
> http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarus<http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20121211/c06a4515/attachment-0003.html>
More information about the Lazarus
mailing list