PRB: Requery Method Changes LockType Property of ADO Recordset to Read-Only (294218)
The information in this article applies to:
- Microsoft Data Access Components 2.0
- Microsoft Data Access Components 2.1
- Microsoft Data Access Components 2.5
- Microsoft Data Access Components 2.6
- Microsoft Data Access Components 2.7
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Learning Edition for Windows 6.0
This article was previously published under Q294218 SYMPTOMS Under certain circumstances, if you call the Requery method of an ActiveX Data Objects (ADO) Recordset object, the LockType property of the Recordset changes to read-only ( adLockReadOnly). This problem may occur under the following
circumstances:
- If you use DataEnvironment command objects to build hierarchical (shaped) recordsets.
-or-
- If you call Requery after you disconnect and reconnect the Recordset in both hierarchical and standard disconnected ADO
recordsets.
RESOLUTION To resolve this problem, use code that is similar to the
following code (instead of calling Requery) to close and to reopen the Recordset:
MyRecordset.Close
MyRecordset.Open
Modification Type: | Major | Last Reviewed: | 11/5/2003 |
---|
Keywords: | kbDataEnv kbprb KB294218 |
---|
|