CAccessorRowset Class
Encapsulates a rowset and its associated accessors in a single class.
template <class TAccessor = CNoAccessor,
template <typename T> class TRowset = CRowset>
class CAccessorRowset : public TAccessor, public TRowset<TAccessor>
TAccessor
An accessor class.
TRowset
A rowset class.
Header: atldbcli.h
Name | Description |
---|---|
Bind | Creates bindings (used when bBind is specified as false in CCommand::Open). |
CAccessorRowset | Constructor. |
Close | Closes the rowset and any accessors. |
FreeRecordMemory | Frees any columns in the current record that need to be freed. |
GetColumnInfo | Implements IColumnsInfo::GetColumnInfo. |
Class TAccessor
manages the accessor. Class TRowset manages the rowset.
Creates the bindings if you specified bBind
as false
in CCommand::Open.
HRESULT Bind();
A standard HRESULT.
Initializes the CAccessorRowset
object.
CAccessorRowset();
Releases any active accessors and the rowset.
void Close();
Releases any associated memory.
Frees any columns in the current record that need to be freed.
void FreeRecordMemory();
Gets column information from the opened rowset.
HRESULT GetColumnInfo(DBORDINAL* pulColumns,
DBCOLUMNINFO** ppColumnInfo,
LPOLESTR* ppStrings) const;
HRESULT GetColumnInfo(DBORDINAL* pColumns,
DBCOLUMNINFO** ppColumnInfo);
See IColumnsInfo::GetColumnInfo in the OLE DB Programmer's Reference.
A standard HRESULT.
The user must free the returned column information and string buffer. Use the second version of this method when you use CDynamicAccessor and need to override the bindings.
For more information, see IColumnsInfo::GetColumnInfo in the OLE DB Programmer's Reference.
OLE DB Consumer Templates
OLE DB Consumer Templates Reference