PRB: Cannot Retrieve Primary Key Using ADOX Key Object Collection (294157)
The information in this article applies to:
- ActiveX Data Objects (ADO) 2.5
- ActiveX Data Objects (ADO) 2.6
- Microsoft Data Access Components 2.5
- Microsoft Data Access Components 2.6
- Microsoft Data Access Components 2.7
This article was previously published under Q294157 SYMPTOMS When you use an ADOX key object collection to retrieve the
primary key column information of a Microsoft Access table or SQL Server table,
a C++ exception may occur. Microsoft Visual Basic code may return the following
error: operation is not supported by the provider.
CAUSE To retrieve columns used by the primary key, ADOX uses the IDBSchemaRowset::GetRowset method with DBSCHEMA_KEY_COLUMN_USAGE, which is not supported by
the SQL Server OLE DB provider (SQLOLEDB) provider and is supported only by the
latest version of the Jet OLE DB Provider which is installed with the latest
version of the Jet Service Pack.
For additional information about how to obtain
the Jet service pack, click the following article number to view the article in the Microsoft Knowledge Base:
239114
How To: Obtain the Latest Service Pack for the Microsoft Jet 4.0 Database Engine
STATUS This behavior is by design.
Modification Type: | Minor | Last Reviewed: | 11/26/2003 |
---|
Keywords: | kbnofix kbprb KB294157 |
---|
|