The ISASColumnsInfo interface method supplements the standard OLE DB IColumnsInfo interface methods. Its single method returns column metadata that is specific to SAS and does not directly map to OLE DB constructs.
Method | Description |
---|---|
GetColumnInfo | Returns column metadata that is specific to SAS |
As part of the ISASColumnsInfo customized interface, the GetColumnInfo method returns the SAS column metadata that is not supported by the GetColumnInfo method in the standard IColumnsInfo interface.
HRESULT GetColumnInfo( ULONG * pcColumns, SASCOLUMNINFO ** prgInfo, OLECHAR ** ppStringsBuffer );
This method makes no logical change to the state of the object. GetColumnInfo returns a fixed set of column metadata in an array of SASCOLUMNINFO structures, one structure per column.
The order of the structures is the order in which the columns appear in the rowset (column ordinal order). This is the same order in which they are returned from IColumnsInfo::GetColumnInfo.
Bookmark columns are never included in the output of this method.
Note: The GetColumnInfo method provides a quick alternative to the GetColumnsRowset method. While the GetColumnsRowset method returns all available column metadata, it does so in a rowset. To get the metadata, the consumer must create the column metadata rowset, create one or more accessors, get each row in the rowset, and get the data from the rowset.
GetColumnInfo returns column metadata in SASCOLUMNINFO structures.
typedef struct tagSASCOLUMNINFO { LPOLESTR pwszColDesc; LPOLESTR pwszFmtName; LPOLESTR pwszIFmtName; ULONG iOrdinal; SHORT iFmtLength; SHORT iFmtDecimal; SHORT iIFmtLength; SHORT iIFmtDecimal; SHORT iSortInfo; BOOL fIndexed; } SASCOLUMNINFO;
The elements (members) of the SASCOLUMNINFO structure are described in the following table:
Element | Description |
---|---|
pwszColDesc | Pointer to the column description (the SAS variable label). If no label is associated with this column, this member is NULL. |
pwszFmtName | Pointer to the persisted format name. If no format is associated with this column, this member is NULL. |
pwszIFmtName | Pointer to the persisted informat name. If no informat is associated with this column, this member is NULL. |
iOrdinal | The ordinal of the column. This corresponds to the SAS variable number. |
iFmtLength | The width of the formatted data. This member is valid only when pwszFmtName is not NULL. |
iFmtDecimal | The decimal width of the format data. This member is valid only when pwszFmtDecimal is not NULL. |
iIFmtLength | The width of the informatted data. This member is valid only when pwszIFmtName is not NULL. |
iIFmtDecimal | The decimal width of the informatted data. This member is valid only when pwszIFmtName is not NULL. |
iSortInfo | A signed short value that indicates the column's position in any applied sorting hierarchy. Positive values indicate ascending sort order, and negative values indicate descending sort order. The absolute value of the signed short value describes the position of the variable in the sorting hierarchy. Zero (0) indicates that the column does not participate in sorting.
Note: For the SAS/SHARE and local providers, this member is valid. For the SAS IOM Data Provider, this member is not valid. That is, it always contains 0 whether or not the column participates in the sorting. |
fIndexed |
True when this column is an indexed column. |
About Custom Interfaces
ISASDataSetInfo Custom Interface
ISASDatasetInfo90 Custom Interface