Page 1 of 1

transaction and lost connection

Posted: Wed 28 Jul 2010 08:08
by direct_mki
Hi

i am using MyDAC 5.90.0.59 and delphi 5

i have a transaction that is completely executed and committed but nevertheless i got a "lost connection" exception in delphi sometimes. the exception is raised from the commit statement in delphi, but all SQLs are executed (and commited!) in database.

any ideas?

Michael

Posted: Wed 28 Jul 2010 09:35
by Dimon
Connection can be lost because of unstable network. To process lost connection you should use the LocalFailover mode and handle the OnConnectionLost event. You can find more detailed information about these properties in the MyDAC help.

Posted: Wed 28 Jul 2010 12:17
by direct_mki
OK, but in the line before the commit i have a connection.ping without an error.
And: the SQLs (Inserts, Updates, etc.) in database ARE committed afterwards

How should I proceed then after the OnConnectionLost event? I can not reexecute my SQLs if they are already executed. I have no information about the commit has succeeded.

Posted: Wed 28 Jul 2010 15:19
by Dimon
I can not reproduce the problem. Please send me a complete small sample to dmitryg*devart*com to demonstrate it, including a script to create and fill table.