To open the rowset, execute commands, and initiate bindings, you need to create instances of CTable and CCommand. These classes derive from CAccessorRowset as shown in the following figure.
The CTable class supports accessing data sources without commands. This simple class opens a table on a data source using a table name that you specify.
For data sources that support commands, you can use the CCommand class instead. To execute a command, call Open on this class. As an alternative, you can call Prepare to prepare a command that you want to execute more than once.
CCommand has three template arguments: an accessor class, a rowset class, and CNoMultipleResults (by default) or CMultipleResults. If you specify CMultipleResults, the CCommand class will support the IMultipleResults interface and handle multiple rowsets. The DBVIEWER sample shows how to handle the multiple results.