[Lazarus] Is there a way to reconnect to postgresql if the connection fails?

Luca Olivetti luca at wetron.es
Thu May 17 09:50:02 CEST 2018


El 15/05/18 a les 21:43, Luca Olivetti via Lazarus ha escrit:
> El 15/05/18 a les 21:11, Michael Van Canneyt via Lazarus ha escrit:
> 
>> I will need to check this, but the purpose of Close(True) is exactly to
>> ignore errors while closing for a reconnect. It was introduced and 
>> tested in the case of MySQL, but
>> normally should work on any database.
>>
>> Can you please post a small sample program in the bugtracker ?
> 
> Done
> 
> https://bugs.freepascal.org/view.php?id=33737

Using the same project as in the bug report, almost every time I set the 
"Active" property of the SQLQuery1 component to true in the object 
inspector I get an "Access violation" and the selection tree in the 
object inspector gets messed up.
It doesn't happen if I use zeos.
I tried both with the original fcl-db and the one modified as my last 
message in the bug report (I rebuild lazarus every time I changed fcl-db).
Fpc 3.0.4/lazarus 1.8.2, win32 and linux (64 bits)/qt

The access violation happens inside 
TComponentTreeView.UpdateComponentsNodesValues, UpdateComponentNode, 
line "if APersistent is TComponent", when Anode is the first 
TSQLDBFieldDef in the sqlquery


Bye
-- 
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007


More information about the Lazarus mailing list