OLE DB Rowsets (SQL Server Compact)

Rowsets are the central objects that enable OLE DB components to reveal and modify data in tabular form. A rowset object is a set of rows in which each row has columns of data. Using the OLE DB Provider for Microsoft SQL Server Compact 3.5 (SQL Server Compact 3.5), a rowset object is created either when ICommand::Execute returns data or by directly calling IOpenRowset::OpenRowset.

The following issues affect the handling of rowsets in SQL Server Compact 3.5:

  • SQL Server Compact 3.5 supports retrieving only one row at a time. You can retrieve rows sequentially by calling IRowset::GetNextRows(NULL, 0, 1...), or you can retrieve a specific row by specifying the row number when calling IRowset::GetNextRows.
  • A rowset may be scrollable. If it is, you can specify IRowset::GetNextRows(NULL, -1, 1...).
  • Rowsets can become zombies if the internal resource on which they depend goes away because a transaction stops.
  • The OLE DB provider for SQL Server Compact 3.5 supports data binding "by value" but not "by reference."
  • SQL Server Compact 3.5 always returns computed column values when inserting new rows. This enables clients to immediately retrieve this information. This lets the client view any identity column value for the new row even before the row has been committed to the data store. Because of this, the value for DBPROP_SERVERDATAONINSERT must always be VARIANT_TRUE.
  • There are other properties that correspond to various interfaces that can be supported on a rowset. Clients that do not request the interfaces that they want to use on the resulting interface through the property mechanism cannot necessarily access those interfaces, even if the cursor type selected can actually support that functionality. For more information, see Rowset Properties (OLE DB).

When you use rowsets, a number of factors can affect the efficiency of the operation. For more information, see Using OLE DB Rowsets Efficiently.