Updating changed cells only
DBEdit, DBGate, and ODataDB save rows whenever any cell has been modified at least once.
For instance, if a user changes a value from 1 to 2 and then back from 2 to 1, the row will still be saved.
The SaveToDB add-in offers two modes for updating rows:
- All cells
- Changed cells only
In the first mode, the add-in saves all columns of all edited rows, regardless of whether any actual changes occurred.
In the second mode, the add-in saves only the columns that have been modified.
The first mode is faster and results in less data being saved in the workbook.
The second mode can be more efficient when many rows are edited but remain unchanged. For example, if a user copies and pastes an entire column.
Users can switch between modes using the Options dialog box.
Developers can override the user's selection by using the UpdateEntireRow and UpdateChangedCellsOnly event types in the xls.handlers table.
For example:
ID | TABLE_SCHEMA | TABLE_NAME | COLUMN_NAME | EVENT_NAME | HANDLER_SCHEMA | HANDLER_NAME | HANDLER_TYPE | HANDLER_CODE |
---|---|---|---|---|---|---|---|---|
s03 | usp_budget_request | UpdateEntireRow | ATTRIBUTE |