Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 238243 - Last Review: September 16, 2003 - Revision: 2.1
PRB: Method 'Open' of Object '_Recordset' Fails with Jet OLEDB Provider
This article was previously published under Q238243
When you use the Jet OLE DB Provider version 4.0, an application may fail with the following error message:
Run-Time Error -2147467259 (80004005) Method 'Open' of Object '_Recordset' Failed.
This error occurs when trying to issue certain queries to the database.
In Jet 4.0 there is a new property called ExtendedAnsiSQL. The Jet OLEDB Provider version 4.0 turns on this new ANSI flag to enable new SQL syntax. Because the ExtendedAnsiSQL flag is turned on, Jet 4.0 uses the reserved words list defined by the SQL-92 standard. If the user tries to use a SQL-92 reserved word as an unquoted object name, an error is returned.
To work around this problem, try one of the following:
- Change the name of the field in the database so that it does not use one of the reserved words define by the SQL-92 standard.
- Place square brackets ([]) around the reserved word in the query. This allows the query to be executed even though the reserved word is in use. For example, "SELECT Usage From Table1" would become "SELECT [Usage] From Table1."
This behavior is by design. The Microsoft Jet 4.0 OLEDB Provider
relies on this setting and it cannot be disabled.
For a list of all the reserved words that Jet now enforces when this ANSI flag is turned on, refer to the following Microsoft Knowledge Base article:
248738Â
(http://kbalertz.com/Feedback.aspx?kbNumber=248738/EN-US/
)
INFO: Microsoft Jet 4.0 Reserved Words
APPLIES TO
- Microsoft OLE DB Provider for Jet 4.0
- Microsoft Data Access Components 2.5
| kbdatabase kbmdacnosweep kbprb KB238243 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate
(Optional) Name
(Optional)
Public URL Or Email
Comments
No
HTML -- Text Only Please