PRB: Use Open Method to Change CursorType and LockType (188857)
The information in this article applies to:
- ActiveX Data Objects (ADO) 2.0
- ActiveX Data Objects (ADO) 2.1
- ActiveX Data Objects (ADO) 2.5
- ActiveX Data Objects (ADO) 2.6
- ActiveX Data Objects (ADO) 2.7
This article was previously published under Q188857 SYMPTOMS
If a recordset is opened through a connection object or a command object, the CursorType defaults to adOpenForwardOnly, and the LockType defaults to adLockReadOnly if the cursorlocation is adUseServer. Changing these properties before creating the recordset does not cause an error, but the properties are not preserved.
CAUSE
When execute is used to open a recordset, it is creating a recordset with
default properties.
RESOLUTION
Use the open method to create the recordset. The preceding properties of the recordset may then be set before the open statement or they may be set with the open statement.
STATUS
This behavior is by design.
REFERENCES
Microsoft Developer Network CD, search on: "locktype"; "ADO Data Control Constants."
Modification Type: | Minor | Last Reviewed: | 3/2/2005 |
---|
Keywords: | kbprb KB188857 |
---|
|