CreateAccessor

HRESULT CreateAccessor(
const DBBINDING *pBindings, 
ULONG cBindings, 
HACCESSOR& haccessor, 
DBSTATUS *pStatus = NULL);
HRESULT CreateAccessor(
const CBindingsArray bindings, 
HACCESSOR& haccessor, 
DBSTATUS *pStatus = NULL);

Parameters

bindings

Reference to a bindings array.

pBindings

Pointer to DBBINDING array. Can be NULL if cBindings is zero.

cBindings

The number of bindings in the given array. Can be zero if pBindings is NULL.

haccessor

Reference to buffer to receive created accessor handle. Use CRowset::ReleaseAccessor when the accessor is no longer needed.

pStatus

Pointer to a DBSTATUS array. This array must be allocated by the caller and must contain at least cBindings number of elements. This argument can be NULL if the result status of the individual bindings are not needed.

Return Code

S_OK

Method succeeded.

E_FAIL

Returned if the object is not attached (or if the bindings array is empty).

Comments

Uses IAccessor::CreateAccessor to create a row accessor using the given binding information. If pBindings is NULL and cBindings is zero, a null accessor is created. A null accessor is a special accessor that can be used to insert a row whose columns contain default values. See CRowset::InsertRow.

The bindings array must contain at least one element.