Database Help Framework Procedures
Procedure | Description |
---|---|
doc.usp_translations | This procedure is an Excel form to select and edit translations in all languages. |
doc.usp_translations_change | This procedure updates a database on cell changes of doc.usp_translations. |
doc.xl_actions_database_documentation | This procedure generates the database documentation. |
doc.xl_actions_refresh_modules | This procedure refreshes SQL definitions of stored procedures and functions. |
doc.xl_actions_set_role_permissions | This procedure sets permissions for the doc_readers and doc_writers roles. |
doc.xl_delete_help_column | This procedure deletes a column help row. |
doc.xl_delete_help_object | This procedure deletes an object help row. |
doc.xl_delete_help_parameter | This procedure deletes a parameter help row. |
doc.xl_delete_help_row | This procedure deletes a help row by id. |
doc.xl_export_help | This procedure exports help data. |
doc.xl_export_settings | This procedure exports Database Help Framework settings. |
doc.xl_import_help | This procedure imports a help row. |
doc.xl_import_history | This procedure imports a history row. |
doc.xl_insert_help_diagram | This procedure inserts a diagram help row. |
doc.xl_update_help_column | This procedure updates a column help row. |
doc.xl_update_help_diagram | This procedure updates a diagram help row. |
doc.xl_update_help_object | This procedure updates an object help row. |
doc.xl_update_help_page | This procedure updates a page help row. |
doc.xl_update_help_parameter | This procedure updates a parameter help row. |
doc.xl_validation_list_history_section_id | This procedure selects history sections to use as an Excel validation list source. |
doc.usp_translations
This procedure is an Excel form to select and edit translations in all languages.
Parameter | DataType | Mode | Comment |
---|---|---|---|
@field | nvarchar(128) | IN | The source field of the doc.translations table: TRANSLATED_NAME, TRANSLATED_DESC, or TRANSLATED_COMMENT. |
Editing data requires the SaveToDB Enterprise edition if the SaveToDB version 9.2 or earlier.
SaveToDB 9.3 allows editing data in a free edition.
doc.usp_translations_change
This procedure updates a database on cell changes of doc.usp_translations.
Parameter | DataType | Mode | Comment |
---|---|---|---|
@column_name | nvarchar(128) | IN | The column name of the edited cell (expected doc.translations.LANGUAGE_NAME). |
@cell_value | nvarchar(max) | IN | A new value of the edited cell used to update for the source field. |
@TABLE_SCHEMA | nvarchar(128) | IN | doc.translations.TABLE_SCHEMA |
@TABLE_NAME | nvarchar(128) | IN | doc.translations.TABLE_NAME |
@COLUMN | nvarchar(128) | IN | doc.translations.COLUMN_NAME |
@field | nvarchar(128) | IN | The source field of the xls.translations table: TRANSLATED_NAME, TRANSLATED_DESC, or TRANSLATED_COMMENT. |
The add-in links this procedure to doc.usp_translations procedure automatically due to the _change suffix.
doc.xl_actions_database_documentation
This procedure generates the database documentation.
Parameter | DataType | Mode | Comment |
---|---|---|---|
@language | char(2) | IN | doc.help.LANGUAGE_NAME |
@schema | nvarchar(128) | IN | Possible values:
- NULL (all schemas, default) - Schema - Schema mask like '%25' to select schemas like dbo25 and xls25 - 'x' to select all schemas except schemas of known frameworks |
@part | tinyint | IN | 0 - all
1 - contents-schemas 2 - tables 3 - views 4 - procedures 5 - functions |
@content_only | bit | IN | |
@header_level | int | IN | |
@header_prefix | nvarchar(100) | IN | |
@header_suffix | nvarchar(100) | IN | |
@bottom_toc | bit | IN |
You may customize this procedure to generate the required HTML.
Note that the procedure uses words from the doc.translations table.
So, you may change the required terms in an easy way.
doc.xl_actions_refresh_modules
This procedure refreshes SQL definitions of stored procedures and functions.
The procedure executes sys.sp_refreshsqlmodule for all procedures and functions.
doc.xl_actions_set_role_permissions
This procedure sets permissions for the doc_readers and doc_writers roles.
Execute this procedure if you recreated any object of the doc schema.
doc.xl_delete_help_column
This procedure deletes a column help row.
Parameter | DataType | Mode | Comment |
---|---|---|---|
@TABLE_SCHEMA | nvarchar(128) | IN | doc.help.TABLE_SCHEMA |
@TABLE_NAME | nvarchar(128) | IN | doc.help.TABLE_NAME |
@COLUMN_NAME | nvarchar(255) | IN | doc.help.COLUMN_NAME |
@LANGUAGE_NAME | char(2) | IN | doc.help.LANGUAGE_NAME |
See the configuration in the doc.objects table.
doc.xl_delete_help_object
This procedure deletes an object help row.
Parameter | DataType | Mode | Comment |
---|---|---|---|
@SECTION_ID | tinyint | IN | doc.help.SECTION_ID |
@TABLE_SCHEMA | nvarchar(128) | IN | doc.help.TABLE_SCHEMA |
@TABLE_NAME | nvarchar(128) | IN | doc.help.TABLE_NAME |
@LANGUAGE_NAME | char(2) | IN | doc.help.LANGUAGE_NAME |
See the configuration in the doc.objects table.
doc.xl_delete_help_parameter
This procedure deletes a parameter help row.
Parameter | DataType | Mode | Comment |
---|---|---|---|
@ROUTINE_SCHEMA | nvarchar(128) | IN | doc.help.TABLE_SCHEMA |
@ROUTINE_NAME | nvarchar(128) | IN | doc.help.TABLE_NAME |
@PARAMETER_NAME | nvarchar(255) | IN | doc.help.COLUMN_NAME |
@LANGUAGE_NAME | char(2) | IN | doc.help.LANGUAGE_NAME |
See the configuration in the doc.objects table.
doc.xl_delete_help_row
This procedure deletes a help row by id.
Parameter | DataType | Mode | Comment |
---|---|---|---|
@ID | int | IN | doc.help.ID |
See the configuration in the doc.objects table.
doc.xl_export_help
This procedure exports help data.
Parameter | DataType | Mode | Comment |
---|---|---|---|
@language | char(2) | IN | Two characters of the documentation language code like 'en' or 'fr'. |
@schema | nvarchar(128) | IN | doc.help.TABLE_SCHEMA
Use 'x' to export help for all schemas except doc, logs, and xls. |
@version | nvarchar(50) | IN | doc.help.VERSION
Use it to filter data by a version. |
Exporting data using this procedure is a better choice.
It uses the doc.xl_import_help procedure to merge help topics correctly.
doc.xl_export_settings
This procedure exports Database Help Framework settings.
Parameter | DataType | Mode | Comment |
---|---|---|---|
@part | tinyint | IN | NULL - all
1 - doc.objects 2 - doc.handlers 3 - doc.translations 4 - doc.formats 5 - doc.workbooks 6 - doc.sections 7 - doc.history_sections |
@sort_by_names | bit | IN | 1 - sort by names
0 - sort by id (default) |
@language | char(2) | IN | doc.help.LANGUAGE_NAME |
You may use this procedure to export the framework settings, not the help.
doc.xl_import_help
This procedure imports a help row.
Parameter | DataType | Mode | Comment |
---|---|---|---|
@SECTION_ID | tinyint | IN | doc.help.SECTION_ID |
@TABLE_SCHEMA | nvarchar(128) | IN | doc.help.TABLE_SCHEMA |
@TABLE_NAME | nvarchar(128) | IN | doc.help.TABLE_NAME |
@COLUMN_NAME | nvarchar(255) | IN | doc.help.COLUMN_NAME |
@LANGUAGE_NAME | char(2) | IN | doc.help.LANGUAGE_NAME |
@VERSION | nvarchar(50) | IN | doc.help.VERSION |
@DESCRIPTION | nvarchar(1024) | IN | doc.help.DESCRIPTION |
@COMMENT | nvarchar(max) | IN | doc.help.COMMENT |
The procedure is used in the scripts generated by the doc.xl_export_help procedure.
The procedure tries to update the record first. If the update fails, it inserts a new record.
doc.xl_import_history
This procedure imports a history row.
Parameter | DataType | Mode | Comment |
---|---|---|---|
@TABLE_SCHEMA | nvarchar(20) | IN | doc.history.TABLE_SCHEMA |
@LANGUAGE_NAME | char(2) | IN | doc.history.LANGUAGE_NAME |
@VERSION | nvarchar(50) | IN | doc.history.VERSION |
@SECTION_ID | tinyint | IN | doc.history.SECTION_ID |
@SORT_ORDER | tinyint | IN | doc.history.SORT_ORDER |
@DESCRIPTION | nvarchar(1024) | IN | doc.history.DESCRIPTION |
@COMMENT | nvarchar(1) | IN | doc.history.COMMENT |
The procedure is used in the scripts generated by the doc.xl_export_help procedure.
The procedure tries to update the record first. If the update fails, it inserts a new record.
doc.xl_insert_help_diagram
This procedure inserts a diagram help row.
Parameter | DataType | Mode | Comment |
---|---|---|---|
@DIAGRAM_SCHEMA | nvarchar(128) | IN | doc.help.TABLE_SCHEMA |
@DIAGRAM_NAME | nvarchar(128) | IN | doc.help.TABLE_NAME |
@DIAGRAM_URL | nvarchar(255) | IN | doc.help.COLUMN_NAME |
@LANGUAGE_NAME | char(2) | IN | doc.help.LANGUAGE_NAME |
@VERSION | nvarchar(50) | IN | doc.help.VERSION |
@TITLE | nvarchar(1024) | IN | doc.help.DESCRIPTION |
@COMMENT | nvarchar(max) | IN | doc.help.COMMENT |
See the configuration in the doc.objects table.
doc.xl_update_help_column
This procedure updates a column help row.
Parameter | DataType | Mode | Comment |
---|---|---|---|
@TABLE_SCHEMA | nvarchar(128) | IN | doc.help.TABLE_SCHEMA |
@TABLE_NAME | nvarchar(128) | IN | doc.help.TABLE_NAME |
@COLUMN_NAME | nvarchar(255) | IN | doc.help.COLUMN_NAME |
@LANGUAGE_NAME | char(2) | IN | doc.help.LANGUAGE_NAME |
@VERSION | nvarchar(50) | IN | doc.help.VERSION |
@DESCRIPTION | nvarchar(1024) | IN | doc.help.DESCRIPTION |
@COMMENT | nvarchar(max) | IN | doc.help.COMMENT |
See the configuration in the doc.objects table.
doc.xl_update_help_diagram
This procedure updates a diagram help row.
Parameter | DataType | Mode | Comment |
---|---|---|---|
@ID | int | IN | doc.help.ID |
@DIAGRAM_SCHEMA | nvarchar(128) | IN | doc.help.TABLE_SCHEMA |
@DIAGRAM_NAME | nvarchar(128) | IN | doc.help.TABLE_NAME |
@DIAGRAM_URL | nvarchar(255) | IN | doc.help.COLUMN_NAME |
@LANGUAGE_NAME | char(2) | IN | doc.help.LANGUAGE_NAME |
@VERSION | nvarchar(50) | IN | doc.help.VERSION |
@TITLE | nvarchar(1024) | IN | doc.help.DESCRIPTION |
@COMMENT | nvarchar(max) | IN | doc.help.COMMENT |
See the configuration in the doc.objects table.
doc.xl_update_help_object
This procedure updates an object help row.
Parameter | DataType | Mode | Comment |
---|---|---|---|
@SECTION_ID | tinyint | IN | doc.help.SECTION_ID |
@TABLE_SCHEMA | nvarchar(128) | IN | doc.help.TABLE_SCHEMA |
@TABLE_NAME | nvarchar(128) | IN | doc.help.TABLE_NAME |
@LANGUAGE_NAME | char(2) | IN | doc.help.LANGUAGE_NAME |
@VERSION | nvarchar(50) | IN | doc.help.VERSION |
@DESCRIPTION | nvarchar(1024) | IN | doc.help.DESCRIPTION |
@COMMENT | nvarchar(max) | IN | doc.help.COMMENT |
See the configuration in the doc.objects table.
doc.xl_update_help_page
This procedure updates a page help row.
Parameter | DataType | Mode | Comment |
---|---|---|---|
@TABLE_SCHEMA | nvarchar(128) | IN | doc.help.TABLE_SCHEMA |
@TABLE_NAME | nvarchar(128) | IN | doc.help.TABLE_NAME |
@LANGUAGE_NAME | char(2) | IN | doc.help.LANGUAGE_NAME |
@VERSION | nvarchar(50) | IN | doc.help.VERSION |
@DESCRIPTION | nvarchar(1024) | IN | doc.help.DESCRIPTION |
@COMMENT | nvarchar(max) | IN | doc.help.COMMENT |
See the configuration in the doc.objects table.
doc.xl_update_help_parameter
This procedure updates a parameter help row.
Parameter | DataType | Mode | Comment |
---|---|---|---|
@ROUTINE_SCHEMA | nvarchar(128) | IN | doc.help.TABLE_SCHEMA |
@ROUTINE_NAME | nvarchar(128) | IN | doc.help.TABLE_NAME |
@PARAMETER_NAME | nvarchar(255) | IN | doc.help.COLUMN_NAME |
@LANGUAGE_NAME | char(2) | IN | doc.help.LANGUAGE_NAME |
@VERSION | nvarchar(50) | IN | doc.help.VERSION |
@DESCRIPTION | nvarchar(1024) | IN | doc.help.DESCRIPTION |
@COMMENT | nvarchar(max) | IN | doc.help.COMMENT |
See the configuration in the doc.objects table.
doc.xl_validation_list_history_section_id
This procedure selects history sections to use as an Excel validation list source.
Parameter | DataType | Mode | Comment |
---|---|---|---|
@data_language | char(2) | IN | The SaveToDB add-in passes a data language selected in the SaveToDB Options dialog box.
This is a predefined parameter. |
See the configuration in the doc.handlers table.
In this article
- doc.usp_translations
- doc.usp_translations_change
- doc.xl_actions_database_documentation
- doc.xl_actions_refresh_modules
- doc.xl_actions_set_role_permissions
- doc.xl_delete_help_column
- doc.xl_delete_help_object
- doc.xl_delete_help_parameter
- doc.xl_delete_help_row
- doc.xl_export_help
- doc.xl_export_settings
- doc.xl_import_help
- doc.xl_import_history
- doc.xl_insert_help_diagram
- doc.xl_update_help_column
- doc.xl_update_help_diagram
- doc.xl_update_help_object
- doc.xl_update_help_page
- doc.xl_update_help_parameter
- doc.xl_validation_list_history_section_id