You can
retrieve column metadata by using either the COLUMNS schema rowset
or the IColumnsInfo::GetColumnsInfo() method. Choose the method that
best fits your current needs:
-
You can use the COLUMNS schema
rowset to return metadata about all of the columns in every table
in the data source component. You can also filter the returned data
by a subset of the tables. Filtering enables you to view many details
about the data store without explicitly opening all of the tables
in the data source component.
-
The IColumnsInfo::GetColumnsInfo()
method is available when you have a rowset that is opened on a specific
table. For the opened table, the GetColumnsInfo method returns the
same kind of information that is found in the COLUMNS schema rowset.
The information is returned in an array of DBCOLUMNINFO structures
that can be accessed more efficiently than a schema rowset.