Saving Data to Tables
Tables with primary key or identity columns are editable by default.
To save data loaded from other objects to a table, specify the target table using INSERT, UPDATE, and DELETE objects.
Here’s a sample for the xls.objects table:
ID | TABLE_SCHEMA | TABLE_NAME | TABLE_TYPE | TABLE_CODE | INSERT_OBJECT | UPDATE_OBJECT | DELETE_OBJECT |
---|---|---|---|---|---|---|---|
s02 | view_cashbook | VIEW | s02.cashbook | s02.cashbook | s02.cashbook | ||
s02 | usp_cashbook | PROCEDURE | s02.cashbook | s02.cashbook | s02.cashbook | ||
s02 | code_cashbook | CODE | <SQL> | s02.cashbook | s02.cashbook | s02.cashbook |
Here’s a sample for the QueryList view:
ID | TABLE_SCHEMA | TABLE_NAME | TABLE_TYPE | TABLE_CODE | INSERT_PROCEDURE | UPDATE_PROCEDURE | DELETE_PROCEDURE | PROCEDURE_TYPE |
---|---|---|---|---|---|---|---|---|
s02 | view_cashbook | VIEW | s02.cashbook | s02.cashbook | s02.cashbook | |||
s02 | usp_cashbook | PROCEDURE | s02.cashbook | s02.cashbook | s02.cashbook | |||
s02 | code_cashbook | CODE | <SQL> | s02.cashbook | s02.cashbook | s02.cashbook |
Tools like SaveToDB 8+, DBEdit, DBGate, and ODataDB automatically create these configurations when they can detect the target table.
For instance, if a user has the VIEW DEFINITION permission and a view or stored procedure contains code like SELECT * FROM s02.cashbook
, the tools will handle the necessary configurations.
Remember, target tables must have primary key or identity columns.
Implementation Details
SaveToDB and DBEdit generate and execute INSERT, UPDATE, and DELETE commands automatically.
DBGate issues INSERT, UPDATE, and DELETE commands on the server-side based on POST, PUT, and DELETE requests.
ODataDB creates EntitySets for tables and views, along with FunctionImports that target the EntitySet for stored procedures and SQL code.