Retrieves schema information from the connection's provider.
Call OpenSchema to open a connection and retrieve schema information from the associated provider. OpenSchema retrieves the schema information in the form of a recordset that can then be accessed through an ADO dataset component.
The Schema parameter is the type of schema information to retrieve, or in ADO terms, the query type.
The Restrictions parameter is an array of query constraints for the specified type of schema information. This lists the type of information requested for the entity specified by Schema. In ADO terms, the elements of the array list the criteria for the query type.
SchemaID is the GUID for a provider-schema schema query not defined by the OLE DB specification. This parameter is required if the Schema parameter is set to siProviderSpecific, otherwise it is not used.
DataSet is the ADO dataset component (such as a TADOTable) into the Recordset property of which the schema information is retrieved and through which the information is subsequently accessed. After OpenSchema loads the ADO dataset component with the schema information, use the standard navigation methods like First and Next to traverse the rows of data. Use the Fields property or the FieldByName method of the dataset component to read the value of any one column. Alternately, the schema data may be displayed using visual data-aware controls and a TDataSource.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!