Saving Data
SaveToDB products allow saving changes in two events:
- When a user clicks the Save button
- When a user changes a cell
This section describes configuring methods for the Save button.
To learn about the second way, see Change Handlers.
There are four ways to implement saving changes to a database:
- 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 use these methods to configure REST API for POST, PUT, and DELETE operations.
See details in the following topics:
The SaveToDB add-in supports saving changes for OData and REST API data services.
See details in the following topics:
The SaveToDB add-in also supports merging data.
Take a look at the following advanced features also:
Configuration Tables and Views
You can configure saving changes in the xls.objects table or via query list views.
Here is 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 is 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 configure the default behavior.
Use the query list views to create automatic configurations using SQL.
To use 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.
Topics of this section usually show samples for the xls.objects table.