The information in this article applies to:
SYMPTOMSIf you try to run Structured Query Language (SQL) against an Oracle database through Data Access Objects (DAO), you can encounter the following error: This error occurs when you try to specify a schema name in your SQL statement and you use DAO with Oracle. The <schema name> in the error message is whatever schema name you specified for the Oracle object you reference. RESOLUTIONIf you add the dbSQLPassThrough option to the OpenRecordset method, the sample code in the MORE INFORMATION section of this article runs without error. You can use brackets ([ ]) around the table name in the SQL string to avoid the error as well:
Also, you can use an advanced data access technology, such as ActiveX Data
Objects (ADO) to avoid this error.
STATUSThis behavior is by design. MORE INFORMATIONThe error message is generated because DAO tries to find an .mdb file in the local directory that matches the schema name you specified for the Oracle object in your SQL. Sample Code
This code generates the error because DAO tries to find the scott.mdb file.
REFERENCESFor information on how to acquire ADO and the new Microsoft Oracle ODBC driver, please see the following article in the Microsoft Knowledge Base: Q175018 HOWTO: Acquire and Install the Microsoft Oracle ODBC DriverFor information on how to use ADO with Oracle, please see the following article in the Microsoft Knowledge Base: Q176936 INFO: Visual Basic 5.0 Accessing an Oracle Database Using ADOFor more information on using DAO with Visual Basic, please see: "Hitchhiker's Guide to Visual Basic & SQL Server," William Vaughn, 784 pages, Microsoft Press, 1997 © Microsoft Corporation 1999, All Rights Reserved. Additional query words:
Keywords : kberrmsg kbDAO kbDAO350 kbOracle kbVBp500 kbGrpVBDB |
Last Reviewed: January 5, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |