Detailed
OpenSchema method
Gets the database schema information from the provider.
Grammar
Set Recordset = connection. OpenSchema (QueryType, Criteria, SchemaID)
return value
Returns the Recordset object that contains the schema information. The Recordset opens with a read-only, static cursor.
Parameters
QueryType the mode query type you want to run, you can be any of the following constants.
The Criteria are optional. An array of query restriction criteria for each querytype option, as listed below:
QueryType Value Criteria Value
Adschemaasserts
Constraint_catalog
Constraint_schema
Constraint_name
Adschemacatalogs
Catalog_name
Adschemacharactersets
Character_set_catalog
Character_set_schema
Character_set_name
Adschemacheckconstraints
Constraint_catalog
Constraint_schema
Constraint_name
Adschemacollations
Collation_catalog
Collation_schema
Collation_name
Adschemacolumndomainusage
Domain_catalog
Domain_schema
Domain_Name
column_name
Adschemacolumnprivileges
Table_catalog
Table_schema
table_name
column_name
Grantor
Grantee
adSchemaColumns
Table_catalog
Table_schema
table_name
column_name
Adschemaconstraintcolumnusage
Table_catalog
Table_schema
table_name
column_name
Adschemaconstrainttableusage
Table_catalog
Table_schema
table_name
Adschemaforeignkeys
Pk_table_catalog
Pk_table_schema
Pk_table_name
Fk_table_catalog
Fk_table_schema
Fk_table_name
adSchemaIndexes
Table_catalog
Table_schema
Index_name
TYPE
table_name
Adschemakeycolumnusage
Constraint_catalog
Constraint_schema
Constraint_name
Table_catalog
Table_schema
table_name
column_name
Adschemaprimarykeys
Pk_table_catalog
Pk_table_schema
Pk_table_name
Adschemaprocedurecolumns
Procedure_catalog
Procedure_schema
Procedure_name
column_name
Adschemaprocedureparameters
Procedure_catalog
Procedure_schema
Procedure_name
Paramter_name
Adschemaprocedures
Procedure_catalog
Procedure_schema
Procedure_name
Procedure_type
adschemaproviderspecific See description
Adschemaprovidertypes
Data_type
Best_match
Adschemareferentialconstraints
Constraint_catalog
Constraint_schema
Constraint_name
Adschemaschemata
Catalog_name
Schema_name
Schema_owner
Adschemasqllanguages < no >
Adschemastatistics
Table_catalog
Table_schema
table_name
Adschematableconstraints
Constraint_catalog
Constraint_schema
Constraint_name
Table_catalog
Table_schema
table_name
Constraint_type
Adschematableprivileges
Table_catalog
Table_schema
table_name
Grantor
Grantee
adSchemaTables
Table_catalog
Table_schema
table_name
Table_type
Adschematranslations
Translation_catalog
Translation_schema
Translation_name
Adschemausageprivileges
Object_catalog
Object_schema
object_name
Object_type
Grantor
Grantee
Adschemaviewcolumnusage
View_catalog
View_schema
View_name
Adschemaviewtableusage
View_catalog
View_schema
View_name
Adschemaviews
Table_catalog
Table_schema
table_name
The SchemaID OLE DB specification does not define GUIDs for provider-mode queries. If the QueryType is set to adSchemaProviderSpecific, the parameter is required, otherwise it is not used.
Description
The OpenSchema method returns information about the data source, such as information about the tables on the server and the columns in the table.
The Criteria argument is an array of values that can be used to restrict the results of a modal query. Each pattern query has a set of different parameters that it supports. The actual mode is provided by the IDBSchemaRowset interface