PRB: "Operation Must Use an Updateable Query" Error Message When You Access Excel Through ODBC (316475)
The information in this article applies to:
- ActiveX Data Objects (ADO) 2.5
- ActiveX Data Objects (ADO) 2.6
- ActiveX Data Objects (ADO) 2.7
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Excel 2002
- Microsoft Excel 97 for Windows
This article was previously published under Q316475 SYMPTOMS
When you edit an Excel worksheet through ADO and ODBC, you may receive the following error message if you use an ADO DataControl object:
[Microsoft][ODBC Excel Driver] Operation must use an updateable query.
If you use a Recordset object that is generated with ADO code, you may receive the following error message when you edit an Excel worksheet through ADO and ODBC:
Run-time error '-2147467259(80004005)':
[Microsoft][ODBC Excel Driver] Operation must use an updateable query.
CAUSE
This problem occurs if you try to edit a worksheet that is saved or opened as ReadOnly.
NOTE: ReadOnly is the default setting for an ODBC connection to Excel, with or without a data source name (DSN). Therefore, the user must always change that setting to edit data.
RESOLUTION
To resolve this problem, use the following methods:
STATUSThis behavior is by design.REFERENCES
For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
257819
HOWTO: Use ADO with Excel Data from Visual Basic or VBA
Modification Type: | Major | Last Reviewed: | 10/13/2003 |
---|
Keywords: | kbprb KB316475 |
---|
|