Using OLE DB Rowsets Efficiently
When you plan an efficient data access strategy for Microsoft SQL Server 2005 Compact Edition (SQL Server Compact Edition), 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 Edition 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 Edition).
- Although SQL Server Compact Edition 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 Edition supports reading and writing to large image and ntext data types through the ISequentialStream and ILockBytes interfaces. For more information, see Working with Large Data Types in OLE DB (SQL Server Compact Edition).