Creating Rowsets with ICommand::Execute

OLE DB and SQL Server

OLE DB and SQL Server

Creating Rowsets with ICommand::Execute

For rowsets created with the ICommand::Execute method, the properties desired in the resulting rowset can constrain the text of the command. This is especially critical for consumers that support dynamic command text.

SQLOLEDB cannot use Microsoft® SQL Server™ 2000 cursors to support the multiple-rowset results generated by many commands. If a consumer requests a rowset requiring SQL Server 2000 cursor support, an error occurs if the command text used generates more than a single rowset as its result. For more information, see Commands Generating Multiple-Rowset Results.

Scrollable SQLOLEDB rowsets are supported by SQL Server 2000 cursors. SQL Server 2000 imposes limitations on cursors that are sensitive to changes made by other users of the database. Specifically, the rows in some cursors cannot be ordered, and attempting to create a rowset by using a command containing an SQL ORDER BY clause can fail. For more information, see Rowsets and SQL Server Cursors.