Data Model > Extending the UNICOM Intelligence Data Model > Creating a CDSC > Implementing the features of a CDSC > Implementing Scroll Backward
 
Implementing Scroll Backward
When the Provider reads data in reverse order through the CDSC, it:
Calls CreateCommand on the Source object to get a Command object (unless it is reusing an existing Command object).
Adds bindings to the Command object for the relevant variables.
Calls MoveLast on the Command and retrieves the Value property from the Value objects for the relevant bindings.
Repeatedly calls MovePrevious on the Command and retrieves the Value property from the Value objects for the relevant bindings, until the Command object's BOF property is true.
Calls Close on the Command object (unless the Provider intends to reuse it later).
For information about the changes required for the Source CreateCommand, DataBindings Append, and Command Close methods, see Implementing Can Select.
Add code to the the MoveLast method of your Command class, so that the last case of data is available in the Value objects that are bound to the command, and the Command object's BOF property is false (unless there is no data). In the C++ skeleton project, change CCommand::MoveLast() to return S_OK instead of E_NOTIMPL if it succeeds.
Add code to the the MovePrevious method of your Command class, so that the previous case of data is available in the bound Value objects, or the Command object's BOF property is true if there is no more data. In the C++ skeleton project, change CCommand::MovePrevious() to return S_OK instead of E_NOTIMPL if it succeeds.
See also
CDSC interface
Implementing the features of a CDSC