IColumnsInfo

This section describes Jet-specific implementation of the IColumnsInfo interfaces. This includes IColumnsInfo::GetColumnInfo and IColumnsInfo::MapColumnIDs.

IColumnsInfo is the simpler of two interfaces that can be used to expose information about columns of a rowset of a prepared command. It provides a limited set of information in an array.

GetColumnInfo returns the most commonly used metadata: column IDs, data types, updatability, and so on. GetColumnInfo returns the metadata in an array of structures, which can be created and accessed quickly. The metadata returned, however, is limited.

Consumers that require more complete metadata can obtain it by calling IColumnsRowset::GetColumnsRowset.

Note   For commands that expose ICommandPrepare, the methods on this interface can be called only after the command is prepared or an instance of the rowset is created. If a command text is set but not prepared, any calls to methods on IColumnsInfo return DB_E_NOTPREPARED. For commands that do not expose ICommandPrepare, the methods on this interface can be called only after the command text has been set.

Method Description
GetColumnInfo Returns the column metadata needed by most consumers.
MapColumnIDs Returns an array of ordinals of the columns in a rowset.

IColumnsInfo::GetColumnsInfo

Returns the column metadata needed by most consumers. For information on how this interface is implemented, see the OLE DB Programmer’s Reference.

IColumnsInfo::MapColumnIDs

Returns an array or ordinals of the columns in a rowset that are identified by the specified column IDs. For information on how this interface is implemented, see the OLE DB Programmer’s Reference.