Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
2 posts • Page 1 of 1
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.