CAccessorBase Class

All accessors in the OLE DB Templates derive from this class. CAccessorBase allows one rowset to manage multiple accessors. It also provides binding for both parameters and output columns.

Syntax

// Replace with syntax

Members

Methods

Name Description
Close Closes the accessors.
GetHAccessor Retrieves the accessor handle.
GetNumAccessors Retrieves the number of accessors created by the class.
IsAutoAccessor Tests whether the specified accessor is an autoaccessor.
ReleaseAccessors Releases the accessors.

Requirements

Header: atldbcli.h

CAccessorBase::Close

Closes the accessors.

Syntax

void Close();

Remarks

You must call ReleaseAccessors first.

CAccessorBase::GetHAccessor

Retrieves the accessor handle of a specified accessor.

Syntax

HACCESSOR GetHAccessor(ULONG nAccessor) const;

Parameters

nAccessor
[in] The zero-offset number for the accessor.

Return Value

The accessor handle.

CAccessorBase::GetNumAccessors

Retrieves the number of accessors created by the class.

Syntax

ULONG GetNumAccessors() const;

Return Value

The number of accessors created by the class.

CAccessorBase::IsAutoAccessor

Returns true if data is automatically retrieved for the accessor during a Move operation.

Syntax

bool IsAutoAccessor(ULONG nAccessor) const;

Parameters

nAccessor
[in] The zero-offset number for the accessor.

Return Value

Returns true if the accessor is an autoaccessor. Otherwise, it returns false.

CAccessorBase::ReleaseAccessors

Releases the accessors created by the class.

Syntax

HRESULT ReleaseAccessors(IUnknown* pUnk);

Parameters

pUnk
[in] A pointer to an IUnknown interface for the COM object for which the accessors have been created.

Return Value

A standard HRESULT.

Remarks

Called from CAccessorRowset::Close.

See also

OLE DB Consumer Templates
OLE DB Consumer Templates Reference
CAccessorBase Class