Using OLE DB Rowsets Efficiently

When you plan an efficient data access strategy for Microsoft SQL Server Compact 4.0, there are several rules to consider.

Rules for Accessing Data

  • When you use deferred update mode in OLE DB, specified by setting DBPROP_IRowsetUpdate to VARIANT_TRUE, SQL Server Compact 4.0 can only have one pending change at a time. This uses a fast mechanism to update internally.

  • IRowset::RestartPosition is efficient when used with scrollable cursors, but it can cause query re-execution when it is used with nonscrollable cursors. For more information, see OLE DB Cursors (SQL Server Compact).

  • Although SQL Server Compact 4.0 supports OLE DB data type coercions to and from DBTYPE_WSTR, it is best to use native data type bindings where you can to maximize performance against this engine.

  • SQL Server Compact 4.0 supports reading and writing to large image and ntext data types through the ISequentialStream and ILockBytes interfaces. For more information, see Large Data Types in OLE DB (SQL Server Compact).

See Also

Other Resources

Rowsets