SAS IOM Data Provider |
The ISASColumnsInfo interface augments the standard OLE DB IColumnsInfo method. Its single method returns SAS specific column metadata that does not directly map to OLE DB constructs.
Method | Description |
GetColumnInfo | Returns SAS specific column metadata. |
Returns the SAS column metadata that is not supported by IColumnsInfo::GetColumnsInfo.
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 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::GetColumInfo.
Bookmark columns are not included in the output of this method. Only the self bookmark column is supported by this provider and the SAS-specific column metadata returned by this provider does not apply.
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 of this structure are as follows:
Element | Description |
pwszColDesc | Pointer to the column description (otherwise known as 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 only valid when pwszFmtName is non-null. |
iFmtDecimal | The decimal width of the format data. This member is only valid when pwszFmtDecimal is non-null. |
iIFmtLength | The width of the informatted data. This member is only valid when pwszIFmtName is non-null. |
iIFmtDecimal | The decimal width of the informatted data. This member is only valid when pwszIFmtName is non-null. |
iSortInfo | A 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.
For the SAS IOM provider, this member is not valid. That is, it always contains zero whether the column participates in the sort key. |
fIndexed |
True when this column is indexed. |
SAS IOM Data Provider |