BEGIN_ACCESSOR_MAP( x, num )
Parameters
x
[in] The name of the user record class.
num
[in] The number of accessors in this accessor map.
Remarks
Marks the beginning of the accessor map entries. In the case of multiple accessors on a rowset, you need to specify BEGIN_ACCESSOR_MAP at the beginning, and use the BEGIN_ACCESSOR macro for each individual accessor. The BEGIN_ACCESSOR macro is completed with the END_ACCESSOR macro. The accessor map is completed with the END_ACCESSOR_MAP macro.
If you have only one accessor in the user record, use the macro BEGIN_COLUMN_MAP.
Macros for OLE DB Consumer Templates
Example
Here is a sample accessor map:
class CArtists : public CAccessor<CArtists>
{
public:
// Data Elements
TCHAR m_szFirstName[20];
TCHAR m_szLastName[30];
short m_nAge;
// output binding map
BEGIN_ACCESSOR_MAP(CArtists, 2)
BEGIN_ACCESSOR(0, true)
COLUMN_ENTRY(1, m_szFirstName)
COLUMN_ENTRY(2, m_szLastName)
END_ACCESSOR()
BEGIN_ACCESSOR(1, false) // not an auto accessor
COLUMN_ENTRY(3, m_nAge)
END_ACCESSOR()
END_ACCESSOR_MAP()
};
See Also