IColumnsInfo

OLE DB Programmer's Reference

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

When to Implement

All rowsets and commands implement IColumnsInfo. Service components can synthesize IColumnsRowset from this so that consumers and providers have independent choice of whether they want to code for simple limited information or to work with flexible and open-ended column descriptions.

IColumnsInfo is required both on commands and on rowsets.

When to Call

IColumnsInfo::GetColumnInfo returns the most commonly used metadata: column IDs, data types, updatability, and so on. IColumnsInfo::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 the rowset is instantiated. 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 that are identified by the specified column IDs.

1998-2001 Microsoft Corporation. All rights reserved.



Microsoft Ole Db 2.0 Programmer's Reference and Data Access SDK
Microsoft OLE DB 2.0 Programmers Reference and Data Access SDK (Microsoft Professional Editions)
ISBN: 0735605904
EAN: 2147483647
Year: 1998
Pages: 1083

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net