Saving Data
SaveToDB products enable saving changes in two scenarios:
- When a user clicks the Save button
- When a user modifies a cell
This section focuses on configuring methods for the Save button.
For details on the second scenario, refer to Change Handlers.
You can implement saving changes to a database in four ways:
- Saving changes to a table
- Saving changes to a view
- Saving changes using stored procedures
- Saving changes using SQL
SaveToDB and DBEdit execute SQL commands against the database connection.
DBGate and ODataDB leverage these methods to configure REST API for POST, PUT, and DELETE operations.
For more information, see:
The SaveToDB add-in supports saving changes for OData and REST API data services.
For further details, check out:
Additionally, the SaveToDB add-in supports merging data.
Explore these advanced features as well:
Configuration Tables and Views
You can configure saving changes in the xls.objects table or through query list views.
Here’s a sample of the xls.objects table:
ID | TABLE_SCHEMA | TABLE_NAME | TABLE_TYPE | TABLE_CODE | INSERT_OBJECT | UPDATE_OBJECT | DELETE_OBJECT |
---|---|---|---|---|---|---|---|
s02 | usp_cashbook | PROCEDURE | s02.cashbook | s02.cashbook | s02.cashbook |
Here’s a sample of a query list view:
ID | TABLE_SCHEMA | TABLE_NAME | TABLE_TYPE | TABLE_CODE | INSERT_PROCEDURE | UPDATE_PROCEDURE | DELETE_PROCEDURE | PROCEDURE_TYPE |
---|---|---|---|---|---|---|---|---|
s02 | usp_cashbook | PROCEDURE | s02.cashbook | s02.cashbook | s02.cashbook |
Use the xls.objects table to set the default behavior.
Use query list views to create automatic configurations using SQL.
To utilize a query list, SaveToDB and DBEdit users must select it in the Connection Wizard dialog box.
DBGate and ODataDB support query lists via URL segments or settings in the configuration files.
Most topics in this section provide samples for the xls.objects table.