CRowsetImpl::GetColumnInfo
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at CRowsetImpl::GetColumnInfo.
Retrieves column information for a particular client request.
Syntax
static ATLCOLUMNINFO* CRowsetBaseImpl::GetColumnInfo(
T* pv,
ULONG* pcCols
);
Parameters
pv
[in] A pointer to the user's CRowsetImpl
derived class.
pcCols
[in] A pointer (output) to the number of columns returned.
Return Value
A pointer to a static ATLCOLUMNINFO structure.
Remarks
This method is an advanced override.
This method is called by several base implementation classes to retrieve column information for a particular client request. Usually, this method would be called by IColumnsInfoImpl
. If you override this method, you must place a version of the method in your CRowsetImpl
-derived class. Because the method may be placed in a non-templatized class, you must change pv
to the appropriate CRowsetImpl
-derived class.
The following example demonstrates GetColumnInfo's usage. In this example, CMyRowset is a CRowsetImpl
-derived class. In order to override GetColumnInfo
for all instances of this class, place the following method in the CMyRowset class definition:
static ATLCOLUMNINFO* GetColumnInfo(CMyProviderRowset* pRowset, DBORDINAL* pcCols)
{
// Add your implementation here and/or call the base class
return CRowsetImpl::GetColumnInfo(pRowset, pcCols);
}
Requirements
Header: atldb.h