Udostępnij za pośrednictwem


Special Row Column DBIDs

OLE DB defines special row column IDs (DBIDs) that can be used as shortcuts to access the row URL column and the row default stream column.

DBROWCOL_ROWURL

DBROWCOL_ROWURL is a predefined GUID that designates a column of a row object that contains the URL of the row. The value of DBROWCOL_ROWURL is defined to be {DBGUID_ROWURL, DBKIND_GUID, 0}. The actual DBID of this column is provider-assigned, but DBROWCOL_ROWURL can be used as a shortcut to obtain this column, if it exists. Row objects are not required to have a column that contains the URL of the row, but if a row object has such a column, this DBID can be used to access the column.

The row URL column is defined by the DBCOLUMNINFO structure described in the following table.

Element

Description

pwszName

Provider-specific.

pTypeInfo

Reserved for future use. Providers are required to set pTypeInfo to NULL.

iOrdinal

Provider-specific. OLE DB does not require the row URL column to have a specific iOrdinal value. Must be nonzero.

dwFlags

DBCOLUMNFLAGS_ISROWURL is set.

ulColumnSize

Size of the URL.

wType

DBTYPE_WCHAR.

bPrecision

~0 (bitwise, the value is not 0; that is, all bits are set to 1).

bScale

~0 (bitwise, the value is not 0; that is, all bits are set to 1).

columnid

Provider-specific.

DBROWCOL_DEFAULTSTREAM

DBROWCOL_ROWDEFAULTSTREAM is a predefined GUID that designates a column of a row object that contains the default stream of the row. The value of DBROWCOL_DEFAULTSTREAM is defined to be {DBGUID_ROWDEFAULTSTREAM, DBKIND_GUID, 0}. The actual DBID of this column is provider-assigned, but DBROWCOL_DEFAULTSTREAM can be used as a shortcut to obtain the column, if it exists. Row objects are not required to have a default stream column, but if a row has a default stream column, this DBID can be used to access the column. A row can have at most one default stream column.

The default stream column is defined by a DBCOLUMNINFO structure as described in the following table.

Element

Description

pwszName

Provider-specific.

pTypeInfo

Reserved for future use. Providers are required to set pTypeInfo to NULL.

iOrdinal

Provider-specific. OLE DB does not require the default stream column to have a specific iOrdinal value. Must be nonzero.

dwFlags

DBCOLUMNFLAGS_ISDEFAULTSTREAM is set.

ulColumnSize

Size of the stream.

wType

DBTYPE_IUnknown.

bPrecision

~0 (bitwise, the value is not 0; that is, all bits are set to 1).

bScale

~0 (bitwise, the value is not 0; that is, all bits are set to 1).

columnid

Provider-specific.

This topic is a part of: