application freezes under linux/Kylix when MySql server down
Posted: Fri 02 Feb 2007 17:56
Hi to all.
I have a simple but serious problem:
I have a PC running under Linux (Debian 3.1) with the application, ad another (XP) with MySql server.
My app opens a connection and a table, and everithings works fine.
After that I disconnect the server (by unplug the lan cable).
At this point when I try to make MyConn.Ping (or any other command like Table1.Active:=True, etc. ) the application freezes, even if I put MyConn.Ping in a Try...Except statement.
Note that MyConn1.ConnectionTimeOut is set to 15 and Table.CommandTimeOut is set to 10
I've put the Ping in a timer:
Try
MyConn1.Ping;
Except
// This never happens !!!!
Caption:='Errore ' + TimeToStr(Now);
End;
Whe I reconnect the cable on the server (sometimes) the application starts goin well again...
Question is:
How can I check if the connection is REALLY connected (when .Ping seems that does not work under Linux)?
My MyDac version is 4.40.0.20 running under Kylix3.
Thank You,
Carlo
I have a simple but serious problem:
I have a PC running under Linux (Debian 3.1) with the application, ad another (XP) with MySql server.
My app opens a connection and a table, and everithings works fine.
After that I disconnect the server (by unplug the lan cable).
At this point when I try to make MyConn.Ping (or any other command like Table1.Active:=True, etc. ) the application freezes, even if I put MyConn.Ping in a Try...Except statement.
Note that MyConn1.ConnectionTimeOut is set to 15 and Table.CommandTimeOut is set to 10
I've put the Ping in a timer:
Try
MyConn1.Ping;
Except
// This never happens !!!!
Caption:='Errore ' + TimeToStr(Now);
End;
Whe I reconnect the cable on the server (sometimes) the application starts goin well again...
Question is:
How can I check if the connection is REALLY connected (when .Ping seems that does not work under Linux)?
My MyDac version is 4.40.0.20 running under Kylix3.
Thank You,
Carlo