The information in this article applies to:
SYMPTOMS
Advanced: Requires expert coding, interoperability, and multiuser skills.
This article assumes that you are familiar with Visual Basic for Applications and with creating Microsoft Access applications using the programming tools provided with Microsoft Access. For more information about Visual Basic for Applications, please refer to the "Building Applications with Microsoft Access 97" manual. CAUSEBy default, Microsoft Access opens a read-only recordset in an ODBCDirect workspace. The read-only recordset gives better performance when you scroll through the recordset. RESOLUTIONIf you want to be able to modify a recordset in an ODBCDirect workspace, you must specify a LockEdits argument with the OpenRecordset method. The full syntax for the OpenRecordset method is:
You create an editable recordset when you use one of the following
constants in the LockEdits argument of the OpenRecordset method:
For example, the following sample code fragment opens an editable recordset
that uses optimistic record locking:
NOTE: You must supply a zero (0) for the Options argument.
STATUSThis behavior is by design. MORE INFORMATIONSteps to Reproduce BehaviorThe following example assumes that you have an ODBC data source that opens the Pubs database in Microsoft SQL Server:
REFERENCESFor more information about ODBCDirect errors, please see the following article in the Microsoft Knowledge Base: Q169276 ACC97: OpenRecordset Method Options Incorrect for ODBCDirectFor more information about ODBCDirect workspaces, search the Help Index for ODBCDirect workspaces or ask the Microsoft Access 97 Office Assistant. For more information about using the OpenRecordset method, search the Help Index for "OpenRecordset method." Additional query words: prb
Keywords : kberrmsg kbusage MdlRcd OdbcHowto OdbcOthr |
Last Reviewed: November 10, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |