Page 1 of 1

TMSConnection problem in OnConnectionLost-event

Posted: Fri 03 Oct 2008 16:34
by tonisanta
Hi, I use the OnConnectionLost-event to reconnect to the database setting the RetryMode to rmReconnectExecute. Sometime I receive an "access violation" doing this and I think I figured out the problem now: if there are TMSQuery-components with emtpy SQL-property (just designtime) and never openend, the procedure TCustomMSConnection.DoError raizes an exception in line "if TCustomMSDataSet(DataSets).FIRecordSet.GetIRowset nil then ...". To reproduce put a connction with OnconnectionLost-event, a query for northwind customers to a form, open the customers, kill the spid of your connection and refresh the customers-query. this should work fine. Now add an empty query to the same form and retry: an access violation occurs. Hope this helps to fix.
br, Toni

Posted: Mon 06 Oct 2008 13:25
by Challenger
Thank you for detailed information. We have reproduced and fixed this problem.