PRB: Jet Doesn't Support QueryDefs on a Non-Attached ODBC Table (149055)
The information in this article applies to:
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 4.0
This article was previously published under Q149055 SYMPTOMS
Jet does not support named QueryDefs on a non-attached ODBC database. A non
attached ODBC database is one that is opened directly with the
OpenDatabase method of the WorkSpace object without the use of an .mdb file.
RESOLUTION
The preferred method for opening an external ODBC table is to attach it to
an .mdb file. For additional information, please see the following
article(s) in the Microsoft Knowledge Base:
150716
: DAO: How To Attach to and Create QueryDefs on ODBC Tables
If this method is not appropriate for your application, the following
example shows how to createQuerydefs with no name:
Set qd = db.CreateQueryDef("")
qd.SQL = "Select * from authors"
STATUS
This behavior is by design because Jet does not have a place to store the
QueryDef object on the ODBC source.
REFERENCES
Jet Database Engine Programmer's Guide, Microsoft Press, page 323
Modification Type: | Minor | Last Reviewed: | 3/14/2005 |
---|
Keywords: | kbprb KB149055 |
---|
|