Contents SAS IOM Data Provider Previous Next

COLUMNS Schema Rowset Extensions

SAS OLE DB providers extend the OLE DB COLUMNS schema rowset to include metadata that is specific to SAS data set variables. These custom schema rowset columns include the same information that is returned by the ISASColumnsInfo interface.  While that interface returns SAS metadata on a per data set basis and is limited to OLE DB clients, these customizations to the COLUMNS schema rowset include all columns (variables) that are in all tables (data sets) in a data source at once and are available to both OLE DB and ADO clients.

The following table lists the columns that are added to the COLUMNS schema rowset.  The columns are returned after the columns that are described in the OLE DB specification and in the following order shown below:

Column nameType indicatorDescription
FORMAT_NAMEDBTYPE_WSTRThe persisted format name. If no format is associated with this column, this member is NULL. This column corresponds to the pwszFmtName member of the SASCOLUMNINFO structure that is returned by ISASColumnsInfo::GetColumnInfo.
FORMAT_LENGTHDBTYPE_I2The persisted width of the formatted data. This column corresponds to the iFmtLength member of the SASCOLUMNINFO structure that is returned by ISASColumnsInfo::GetColumnInfo.
FORMAT_DECIMALDBTYPE_I2The persisted decimal width of the formatted data. This column corresponds to the iFmtDecimal member of the SASCOLUMNINFO structure that is returned by ISASColumnsInfo::GetColumnInfo.
INFORMAT_NAMEDBTYPE_WSTRThe persisted informat name. This column corresponds to the pwszIFmtName member of the SASCOLUMNINFO structure returned by ISASColumnsInfo::GetColumnInfo.
INFORMAT_LENGTHDBTYPE_I2The persisted width to use when applying the default informat. This column corresponds to the iIFmtLength member of the SASCOLUMNINFO structure that is returned by ISASColumnsInfo::GetColumnInfo.
INFORMAT_DECIMALDBTYPE_I2The persisted decimal width to use when applying the default informat. This column corresponds to the iIFmtDecimal member of the SASCOLUMNINFO structure returned by ISASColumnsInfo::GetColumnInfo.
SORT_ORDERDBTYPE_I2A signed short value that indicates this column's position in any applied sort key. Positive values indicate ascending sort order and negative values indicate descending sort order. The absolute value of the key location describes the position of the variable in the sort key. Zero (0) indicates that the column does not participate in the sort key. This column corresponds to the iSortInfo member of the SASCOLUMNINFO structure that is returned by ISASColumnsInfo::GetColumnInfo.

NOTE: (For the SAS IOM and SAS/SHARE providers, this column is currently not valid.)  That is, it always contains zero whether the column participates in the sort key.  For the SAS/SHARE provider only, OLE DB clients (not ADO clients) can get legitimate data for this column from the iSortInfo field that is returned by ISASColumnsInfo::GetColumnsInfo().

For the Local provider, this column IS valid.

DBTYPE_INDEXED

DBTYPE_BOOL

This column is set to VARIANT_TRUE when the variable is indexed; otherwise, it is VARIANT_FALSE. This column corresponds to the fIndexed member of the SASCOLUMNINFO structure that is returned by ISASColumnsInfo::GetColumnInfo.

Note that variable label, which is returned by ISASColumnsInfo::GetColumnInfo() in the pwszColDesc member of the SASDATASETINFO structure, is not represented by any of the custom columns.  The variable label is returned in the standard DESCRIPTION column.

Contents SAS IOM Data Provider Previous Next