description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Learn more about: CManualAccessor Class |
CManualAccessor Class |
11/04/2016 |
|
|
a0088074-7135-465c-b228-69097a50b8cc |
Represents an accessor type designed for advanced use.
class CManualAccessor : public CAccessorBase
Header: atldbcli.h
Name | Description |
---|---|
AddBindEntry | Adds a bind entry to the output columns. |
AddParameterEntry | Adds a parameter entry to the parameter accessor. |
CreateAccessor | Allocates memory for the column bind structures and initializes the column data members. |
CreateParameterAccessor | Allocates memory for the parameter bind structures and initializes the parameter data members. |
Using CManualAccessor
, you can specify the parameter and output column binding by run-time function calls.
Adds a bind entry to the output columns.
void AddBindEntry(DBORDINAL nOrdinal,
DBTYPE wType, DBLENGTH nColumnSize,
void* pData,
void* pLength = NULL,
void* pStatus = NULL) throw ();
See DBBINDING in the OLE DB Programmer's Reference.
nOrdinal
[in] Column number.
wType
[in] Data type.
nColumnSize
[in] Column size in bytes.
pData
[in] A pointer to the column data stored in the buffer.
pLength
[in] A pointer to the field length, if required.
pStatus
[in] A pointer to the variable to be bound to the column status, if required.
To use this function, you must first call CreateAccessor. You cannot add more entries than the number of columns specified in CreateAccessor
.
Adds a parameter entry to the parameter entry structures.
void AddParameterEntry(DBORDINAL nOrdinal,
DBTYPE wType, DBLENGTH nColumnSize,
void* pData,
void* pLength = NULL,
void* pStatus = NULL,
DBPARAMIO eParamIO = DBPARAMIO_INPUT) throw ();
See DBBINDING in the OLE DB Programmer's Reference.
nOrdinal
[in] Parameter number.
wType
[in] Data type.
nColumnSize
[in] Column size in bytes.
pData
[in] A pointer to the column data stored in the buffer.
pLength
[in] A pointer to the field length, if required.
pStatus
[in] A pointer to the variable to be bound to the column status, if required.
eParamIO
[in] Specifies whether the parameter with which the binding is associated is an input, input/output, or output parameter.
To use this function, you must first call CreateParameterAccessor.
Allocates memory for the column bind structures and initializes the column data members.
HRESULT CreateAccessor(int nBindEntries,
void* pBuffer,
DBLENGTH nBufferSize) throw();
nBindEntries
[in] Number of columns. This number should match the number of calls to the CManualAccessor::AddBindEntry function.
pBuffer
[in] A pointer to the buffer where the output columns are stored.
nBufferSize
[in] The size of the buffer in bytes.
One of the standard HRESULT values.
Call this function before you call the CManualAccessor::AddBindEntry
function.
Allocates memory for the parameter bind structures and initializes the parameter data members.
HRESULT CreateParameterAccessor(int nBindEntries,
void* pBuffer,
DBLENGTH nBufferSize) throw();
nBindEntries
[in] Number of columns.
pBuffer
[in] A pointer to the buffer where the input columns are stored.
nBufferSize
[in] The size of the buffer in bytes.
One of the standard HRESULT values.
You must call this function before calling AddParameterEntry.
DBViewer
OLE DB Consumer Templates
OLE DB Consumer Templates Reference
CAccessor Class
CDynamicAccessor Class
CDynamicParameterAccessor Class