Skip to content

Latest commit

 

History

History
129 lines (82 loc) · 3.66 KB

caccessorrowset-class.md

File metadata and controls

129 lines (82 loc) · 3.66 KB
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: CAccessorRowset Class
CAccessorRowset Class
11/04/2016
CAccessorRowset
ATL.CAccessorRowset
ATL::CAccessorRowset
CAccessorRowset.Bind
CAccessorRowset::Bind
CAccessorRowset::CAccessorRowset
CAccessorRowset.CAccessorRowset
ATL.CAccessorRowset.CAccessorRowset
ATL::CAccessorRowset::CAccessorRowset
CAccessorRowset.Close
CAccessorRowset::Close
CAccessorRowset::FreeRecordMemory
CAccessorRowset.FreeRecordMemory
CAccessorRowset.GetColumnInfo
CAccessorRowset::GetColumnInfo
CAccessorRowset class
CAccessorRowset class, methods
CAccessorRowset class, members
Bind method
CAccessorRowset class, constructor
Close method
FreeRecordMemory method
GetColumnInfo method
bd4f58ed-cebf-4d43-8985-1e5fcbf06953

CAccessorRowset Class

Encapsulates a rowset and its associated accessors in a single class.

Syntax

template <class TAccessor = CNoAccessor,
   template <typename T> class TRowset = CRowset>
class CAccessorRowset : public TAccessor, public TRowset<TAccessor>

Parameters

TAccessor
An accessor class.

TRowset
A rowset class.

Requirements

Header: atldbcli.h

Members

Methods

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.

Remarks

Class TAccessor manages the accessor. Class TRowset manages the rowset.

CAccessorRowset::Bind

Creates the bindings if you specified bBind as false in CCommand::Open.

Syntax

HRESULT Bind();

Return Value

A standard HRESULT.

CAccessorRowset::CAccessorRowset

Initializes the CAccessorRowset object.

Syntax

CAccessorRowset();

CAccessorRowset::Close

Releases any active accessors and the rowset.

Syntax

void Close();

Remarks

Releases any associated memory.

CAccessorRowset::FreeRecordMemory

Frees any columns in the current record that need to be freed.

Syntax

void FreeRecordMemory();

CAccessorRowset::GetColumnInfo

Gets column information from the opened rowset.

Syntax

HRESULT GetColumnInfo(DBORDINAL* pulColumns,
   DBCOLUMNINFO** ppColumnInfo,
   LPOLESTR* ppStrings) const;

HRESULT GetColumnInfo(DBORDINAL* pColumns,
   DBCOLUMNINFO** ppColumnInfo);

Parameters

See IColumnsInfo::GetColumnInfo in the OLE DB Programmer's Reference.

Return Value

A standard HRESULT.

Remarks

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.

See also

OLE DB Consumer Templates
OLE DB Consumer Templates Reference