Determining the Layout of Your Data Source
Your data source has many characteristics that can be exposed to your applications via ADO. For instance, some data sources have table names, field names, and indexes. You can use the OpenSchema method of the Connection object to enumerate the characteristics that make up the structure of your data source. The OpenSchema method has the following syntax:
Setrecordset_name = connection_name.OpenSchema(QueryType, Criteria, SchemaID)
Table 4-7 describes each of the components found in the previous syntax declaration.
Table 4-7. The Components of the OpenSchema Method
|
Component |
Description |
|---|---|
|
|
A valid Recordset object. |
|
|
A currently open Connection object. |
|
|
Indicates what type of schema query to perform on the associated connection object. This value must be a valid constant that belongs to the SchemaEnum enumeration. Not all QueryType values are supported by every data source. See the OpenSchema method in Appendix C, for more information. |
|
|
Optional. Indicates a specific constraint used to perform the query as defined by the QueryType argument. Criteria values are specific to each QueryType value, and, because not all QueryTypes are supported by every data source, neither are all Criteria values. |
|
|
Optional. A GUID for a provider-specific schema that is used only
with the QueryType constant,
|
In most cases, your data provider will not support all ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access