IDBSchemaRowset

Consumers can get information about a data source without knowing its structure by using the IDBSchemaRowset methods.

This schema defines a minimum content of the system schema. It is assumed that consumers will precompile and store specialized queries, such as those for command planning and execution-time plan validation, and that storage engines may have specialized optimizations associated with those plans. Consumers can also look at the schema tables in the schema, and thus discover other schema tables and attributes beyond the minimum set.

For information about the schema rowsets, see Appendix B, “Schema Rowsets,” in this document. This provider returns all of the columns in the rowsets returned. This information may be NULL. Provider-specific columns described in Appendix B are returned after the last column defined by OLE DB.

Schema rowsets are identified by GUIDs. The following table lists these GUIDs and the columns for which restrictions can be specified on the schema rowset. The number of restriction columns for each schema rowset are defined as constants prefixed with CRESTRICTIONS_ in the header files. Restriction values are treated as literals rather than as search patterns. For example, the restriction value “A_C” matches “A_C” but not “ABC.”

GUID Number of restrictions Restriction columns
DBSCHEMA_ASSERTIONS 3 CONSTRAINT_CATALOG

CONSTRAINT_SCHEMA

CONSTRAINT_NAME

DBSCHEMA_CATALOG 1 CATALOG_NAME
DBSCHEMA_CHARACTER_SETS 3 CHARACTER_SET_CATALOG

CHARACTER_SET_SCHEMA

CHARACTER_SET_NAME

DBSCHEMA_CHECK_CONSTRAINTS 3 CONSTRAINT_CATALOG

CONSTRAINT_SCHEMA

CONSTRAINT_NAME

DBSCHEMA_COLLATIONS 3 COLLATION_CATALOG

COLLATION_SCHEMA

COLLATION_NAME

DBSCHEMA_COLUMN_DOMAIN_USAGE 4 DOMAIN_CATALOG

DOMAIN_SCHEMA

DOMAIN_NAME

COLUMN_NAME

DBSCHEMA_COLUMN_PRIVILEGES 6 TABLE_CATALOG

TABLE_SCHEMA

TABLE_NAME

COLUMN_NAME

GRANTOR

GRANTEE

DBSCHEMA_COLUMNS 4 TABLE_CATALOG

TABLE_SCHEMA

TABLE_NAME

COLUMN_NAME

DBSCHEMA_CONSTRAINT_COLUMN_USAGE 4 TABLE_CATALOG

TABLE_SCHEMA

TABLE_NAME

COLUMN_NAME

DBSCHEMA_CONSTRAINT_TABLE_USAGE 3 TABLE_CATALOG

TABLE_SCHEMA

TABLE_NAME

DBSCHEMA_FOREIGN_KEYS 6 PK_TABLE_CATALOG

PK_TABLE_SCHEMA

PK_TABLE_NAME

FK_TABLE_CATALOG

FK_TABLE_SCHEMA

FK_TABLE_NAME

DBSCHEMA_INDEXES 5 TABLE_CATALOG

TABLE_SCHEMA

INDEX_NAME

TYPE

TABLE_NAME

DBSCHEMA_KEY_COLUMN_USAGE 7 CONSTRAINT_CATALOG

CONSTRAINT_SCHEMA

CONSTRAINT_NAME

TABLE_CATALOG

TABLE_SCHEMA

TABLE_NAME

COLUMN_NAME

DBSCHEMA_PRIMARY_KEYS 3 TABLE_CATALOG

TABLE_SCHEMA

TABLE_NAME

DBSCHEMA_PROCEDURE_COLUMNS 4 PROCEDURE_CATALOG

PROCEDURE_SCHEMA

PROCEDURE_NAME

COLUMN_NAME

DBSCHEMA_PROCEDURE_PARAMETERS 4 PROCEDURE_CATALOG

PROCEDURE_SCHEMA

PROCEDURE_NAME

PROCEDURE_TYPE

DBSCHEMA_PROVIDER_TYPES 2 DATA_TYPE

BEST_MATCH

DBSCHEMA_REFERENTIAL_CONSTRAINTS 3 CONSTRAINT_CATALOG

CONSTRAINT_SCHEMA

CONSTRAINT_NAME

DBSCHEMA_SCHEMATA 3 CATALOG_NAME

SCHEMA_NAME

SCHEMA_OWNER

DBSCHEMA_SQL_LANGUAGES 0 NONE
DBSCHEMA_STATISTICS 3 TABLE_CATALOG

TABLE_SCHEMA

TABLE_NAME

DBSCHEMA_TABLE_CONSTRAINTS 7 CONSTRAINT_CATALOG

CONSTRAINT_SCHEMA

CONSTRAINT_NAME

TABLE_CATALOG

TABLE_SCHEMA

TABLE_NAME

CONSTRAINT_TYPE

DBSCHEMA_TABLE_PRIVILEGES 5 TABLE_CATALOG

TABLE_SCHEMA

TABLE_NAME

GRATOR

GRANTEE

DBSCHEMA_VIEW_COLUMN_USAGE 3 VIEW_CATALOG

VIEW_SCHEMA

VIEW_NAME

DBSCHEMA_VIEW_TABLE_USAGE 3 VIEW_CATALOG

VIEW_SCHEMA

VIEW_NAME

DBSCHEMA_VIEWS 3 TABLE_CATALOG

TABLE_SCHEMA

TABLE_NAME


For a list of supported schema rowsets, see Appendix B.

Method Description
GetRowset Returns a schema rowset.
GetSchemas Returns a list of schema rowsets accessible by IDBSchemaRowset::GetRowset.

IDBSchemaRowset::GetRowset

Returns a schema rowset. For information on how this interface is implemented, see the OLE DB Programmer’s Reference. For information about the rowset property set, see Appendix A. For more information about the schema rowsets supported, see Appendix B.

IDBSchemaRowset::GetSchemas

Returns a list of schema rowsets accessible by IDBSchemaRowset::GetRowset. For information on how this interface is implemented, see the OLE DB Programmer’s Reference.