When users connect to a database, they see a complete list of database objects by default.
They may select a specific schema to reduce the list of objects.
Later, users use the same list in the query list at the ribbon to change query objects.
You may configure such object lists using special query list views.
Moreover, you may add new objects based on SQL codes, HTTP queries, and text files to lists and save loaded data to databases.
See Code-based Objects for details.
Query list views also allow configuring saving changes.
SaveToDB reads the query list configuration from tables and views with the following fields:
- An optional primary key column like ID
- TABLE_SCHEMA *
* The add-in does not use the TABLE_SCHEMA field values with Microsoft SQL Server Compact and SQLite.
TABLE_SCHEMA and TABLE_NAME define objects.
TABLE_TYPE defines object types and may contain values: TABLE, VIEW, PROCEDURE, CODE, HTTP, TEXT, and HIDDEN.
You may specify the HIDDEN type to exclude database objects from query lists shown in Excel.
TABLE_CODE defines an SQL code, URL, or a text file query.
INSERT_PROCEDURE, UPDATE_PROCEDURE, and DELETE_PROCEDURE configure how to save changes and can have NULL values.
PROCEDURE_TYPE defines the type of edit procedures and may contain values: TABLE, PROCEDURE, and CODE.
Creating Query List Views
To configure a query list, create a view with the fields described above.
You may select objects from INFORMATION_SCHEMA views directly.
However, it is much simpler to select objects from SaveToDB Framework query list views like xls.queries (SaveToDB Framework 8) or xls01.viewQueryList (prior versions).