BUG: Error Message “Rows Must Be Released” with SQLOLEDB and ADO Recordset Events
Symptoms
If a user opens an ActiveX Data Object (ADO) recordset by using the OLE DB Provider for SQL Server, sets the CursorLocation property to adUseServer, uses the WithEvents keyword, updates the same record more than once, and then executes a Move method such as MoveNext, the following error message appears
in MDAC versions 2.5 and later:
80040e25: Row handles must be released before new ones can be obtainedin prior MDAC versions:
All HROWs must be released before new ones can be obtained
Resolution
This error message can be avoided in one of the following ways:Using a CursorLocation property of adUseClient.
-or-
Implementing code that moves off the changed record after each Update (for example, a MoveNext and MovePrevious method pair).
-or-
Executing the Requery method of the Recordset after each Update.

Leave a Reply