Provide information about primary keys from ODBC GetSchema() #35442
Labels
area-System.Data.Odbc
backlog-cleanup-candidate
An inactive issue that has been marked for automated closure.
no-recent-activity
Request, similar to #28517
Right now it is possible to get names and columns for primary keys, foreign keys and indexes for ODBC using
Indexes
schema table, but it is not possible to tell wether it actually PK, FK or Index.This creates problem when you need this information from
Access
database, asGetSchema
is the only way to get schema information for it. Most of ther databases allow you to queryINFORMATION_SCHEMA
or similar sources of schema information.FYI, this information available over OleDb provider.
E.g. following test table (MS Access):
produce following data in Indexes table:

As you can see there is no way to distinguish index types. There is even some TYPE column, but it contains same obscure
3
value for all records.The text was updated successfully, but these errors were encountered: