Which Accessor Should I Use?
There are four main types of accessors in the consumer templates. Each accessor has its own advantages and disadvantages. Depending upon your situation one accessor type should suit your needs.
CAccessor
Binding | Parameters | Comments |
Create a user record with COLUMN_ENTRY macros. The macros bind a data member in that record to the accessor. Once the rowset is created, columns cannot be unbound. | Yes, by using a PARAM_MAP macro entry. Once bound, parameters cannot be unbound. |
Fastest accessor because of small amount of code. |
CDynamicAccessor
Binding | Parameters | Comments |
Automatic. | No. | Useful if you do not know the type of data in a rowset. |
CDynamicParameterAccessor
Binding | Parameters | Comments |
Automatic, but can be overridden. | Yes, if the provider supports ICommandWithParameters. Parameters bound automatically. | Slower than CDynamicAccessor but useful for calling generic stored procedures. |
CManualAccessor