Working with result sets

OLE DB functions that execute statements and manipulate result sets use cursors to carry out their tasks. Applications open a cursor implicitly when they execute a statement that returns a result set.

For applications that move through a result set only in a forward direction and do not update the result set, cursor behavior is relatively straightforward. By default, OLE DB applications request this behavior. OLE DB defines a read-only, forward-only cursor, and the ^ PRODUCT ^ provides a cursor optimized for performance in this case.

To limit the number of rows returned in a row set, use the DBPROP_MAXROWS rowset property. The default value of this property is 0, which indicates no limit to the number of returned rows.

NoteTo enable server-side cursors, set the UseCursor property to 1.