After setting all the row data (BLOB and otherwise), we can insert or update it. If you want to delete a row it is pointless to write data to it. If you remember, I said that when using BLOBs with SQL Compact we must use the deferred update mode by requesting the IRowsetUpdate interface. Here's how the code changes for each operation (insert, update or delete):
- Call IRowsetChange::InsertRow - this sets the non-BLOB data;
- Call IRowsetChange::SetData for each BLOB accessor;
- Call IRowsetUpdate::Update to commit the changes.
- Call IRowsetChange::SetData for each accessor.
- Call IRowsetUpdate::Update to commit the row changes.
- Call IRowsetChange::DeleteRow.
- Call IRowsetUpdate::Update.