Contents Diagrams Roles Schemas Tables Views Procedures Functions

SaveToDB Framework
for Microsoft SQL Server

Procedures

ProcedureDescription
xls.usp_role_membersThis procedure is an Excel form to manage role members.
xls.usp_role_members_changeThis procedure updates a database on cell changes of xls25.usp_role_members.
xls.usp_translationsThis procedure is an Excel form to select and edit translations in all languages.
xls.usp_translations_changeThis procedure updates a database on cell changes of xls.usp_translations.
xls.xl_actions_generate_constraintsThis procedure generates primary key, unique, and foreign key constraints.
xls.xl_actions_generate_handlersThis procedure generates SaveToDB event handlers.
xls.xl_actions_generate_proceduresThis procedure generates edit procedures and cell change handlers.
xls.xl_actions_set_role_permissionsThis procedure sets permissions for the xls_users, xls_developers, and xls_formats roles.
xls.xl_delete_translationThis procedure deletes rows of xls.view_all_translations.
xls.xl_export_settingsThis procedure exports SaveToDB Framework settings.
xls.xl_import_formatsThis procedure imports SaveToDB Framework settings into xls.formats.
xls.xl_import_handlersThis procedure imports SaveToDB Framework settings into xls.handlers.
xls.xl_import_objectsThis procedure imports SaveToDB Framework settings into xls.objects.
xls.xl_import_translationsThis procedure imports SaveToDB Framework settings into xls.translations.
xls.xl_import_workbooksThis procedure imports SaveToDB Framework settings into xls.workbooks.

xls.usp_role_members

This procedure is an Excel form to manage role members.

Use this form to easily add business users to the xls_users and xls_formats roles.

Note that you may generate a complete workbook for permission management using the Application Workbooks wizard.

xls.usp_role_members_change

This procedure updates a database on cell changes of xls25.usp_role_members.

ParameterDataTypeModeComment
@column_namenvarchar(128)INThe column name of the edited cell (expected role name).
@cell_number_valueintIN1 - Add the user to the role
0 - Remove the user from the role
@namenvarchar(128)INUser or role name (value of the name column)
@data_languagechar(2)INThe SaveToDB add-in passes a data language selected in the SaveToDB Options dialog box.
This is a predefined parameter.

xls.usp_translations

This procedure is an Excel form to select and edit translations in all languages.

ParameterDataTypeModeComment
@fieldnvarchar(128)INThe source field of the xls.translations table: TRANSLATED_NAME, TRANSLATED_DESC, or TRANSLATED_COMMENT.

Editing data requires the SaveToDB Enterprise edition.

xls.usp_translations_change

This procedure updates a database on cell changes of xls.usp_translations.

ParameterDataTypeModeComment
@column_namenvarchar(128)INThe column name of the edited cell (expected xls.translations.LANGUAGE_NAME).
@cell_valuenvarchar(max)INA new value of the edited cell used to update for the source field.
@TABLE_SCHEMAnvarchar(128)INxls.translations.TABLE_SCHEMA
@TABLE_NAMEnvarchar(128)INxls.translations.TABLE_NAME
@COLUMNnvarchar(128)INxls.translations.COLUMN_NAME
@fieldnvarchar(128)INThe source field of the xls.translations table: TRANSLATED_NAME, TRANSLATED_DESC, or TRANSLATED_COMMENT.

xls.xl_actions_generate_constraints

This procedure generates primary key, unique, and foreign key constraints.

ParameterDataTypeModeComment
@DropbitIN1 - Generate DROP commands
0 - Do not generate DROP commands
@ALTERbitIN
@ConstraintTypetinyintIN1 - Primary key constraint
2 - Unique constraint
3 - Index
4 - Foreign key constraint
@SCHEMAnvarchar(128)INTable schema
@TABLEnvarchar(128)INTable name
@COLUMNnvarchar(128)INColumn name
@REFERENTIAL_SCHEMAnvarchar(128)INReferenced table schema
@REFERENTIAL_NAMEnvarchar(128)INReferenced table name
@REFERENTIAL_COLUMNnvarchar(128)INReferenced column name
@ON_UPDATEnvarchar(128)INCASCADE, SET NULL, SET DEFAULT, OR NULL (NO_ACTION)
@ON_DELETEnvarchar(128)INCASCADE, SET NULL, SET DEFAULT, OR NULL (NO_ACTION)
@CONSTRAINTnvarchar(128)INConstraint name
@ExecuteScriptbitIN1 - Execute the script
0 - Do not execute the script (default)
@DataLanguagechar(2)INThe SaveToDB add-in passes a data language selected in the SaveToDB Options dialog box.
This is a predefined parameter.
@SelectCommandsbitIN1 - Select generated commands (default if @PrintCommands IS NULL)
0 - Do not select generated commands (default if @PrintCommands IS NOT NULL)
@PrintCommandsbitIN1 - Print generated commands (using the PRINT command)
0 - Do not print generated commands (default)

Use the xls.view_primary_keys, xls.view_unique_keys, and xls.view_foreign_keys views to easily add or drop constraints.

These views allow executing the procedure using the context menu.

xls.xl_actions_generate_handlers

This procedure generates SaveToDB event handlers.

ParameterDataTypeModeComment
@BaseTableSchemanvarchar(128)INBase object schema
@BaseTableNamenvarchar(128)INBase object name
@TargetObjectSchemanvarchar(128)INTarget object schema
@TargetObjectNamenvarchar(128)INTarget object name
@HandlerTypeintIN1 - ValidationList
2 - ParameterValues
3 - ParameterValues with the NULL value
4 - ContextMenu
5 - DoubleClick
6 - SelectionChange
7 - Actions
@GenerateTargetAsViewbitIN1 - Generate the target object as a view
0 - Generate the target object as a procedure
@ExecuteScriptbitIN1 - Execute the script
0 - Do not execute the script (default)
@RecreateProceduresIfExistbitIN1 - Execute DROP first if the target object exists
0 - Do not execute DROP commands
@DataLanguagechar(2)INThe SaveToDB add-in passes a data language selected in the SaveToDB Options dialog box.
This is a predefined parameter.
@SelectCommandsbitIN1 - Select generated commands (default if @PrintCommands IS NULL)
0 - Do not select generated commands (default if @PrintCommands IS NOT NULL)
@PrintCommandsbitIN1 - Print generated commands (using the PRINT command)
0 - Do not print generated commands (default)

Members of the xls_developers role may execute this procedure using the Actions menu.

The xls.view_developer_handlers view configures the Actions menu for every database object.

This feature may save a lot of time as the procedure generates complete procedure declarations. Developers may just edit the body to solve specific tasks.

xls.xl_actions_generate_procedures

This procedure generates edit procedures and cell change handlers.

ParameterDataTypeModeComment
@BaseTableSchemanvarchar(128)INBase object schema
@BaseTableNamenvarchar(128)INBase object name
@SelectObjectSchemanvarchar(128)INTarget schema of generated objects
@SelectObjectNamenvarchar(128)INTarget name of the select object.
Edit procedures and change handlers get the same name with the standard suffixes.
@GenerateSelectObjectbitIN1 - Generate a view or procedure to select data
0 - Do not generate a select object
@GenerateEditProceduresbitIN1 - Generate procedures for INSERT, UPDATE, and DELETE operations
0 - Do not generate edit procedures
@GenerateChangeHandlerbitIN1 - Generate a procedure to process cell change events
0 - Do not generate change handler
@GenerateSelectAsViewbitIN1 - Generate the target SELECT object as a view
0 - Generate the target SELECT object as a procedure
@ExecuteScriptbitIN1 - Execute the script
0 - Do not execute the script (default)
@RecreateProceduresIfExistbitIN1 - Execute DROP first if the target object exists
0 - Do not execute DROP commands
@DataLanguagechar(2)INThe SaveToDB add-in passes a data language selected in the SaveToDB Options dialog box.
This is a predefined parameter.
@SelectCommandsbitIN1 - Select generated commands (default if @PrintCommands IS NULL)
0 - Do not select generated commands (default if @PrintCommands IS NOT NULL)
@PrintCommandsbitIN1 - Print generated commands (using the PRINT command)
0 - Do not print generated commands (default)

Members of the xls_developers role may execute this procedure using the Actions menu.

The xls.view_developer_handlers view configures the Actions menu for every database object.

This feature may save a lot of time as the procedure generates ready-to-use procedure.
Developers may also edit the body to solve specific tasks.

xls.xl_actions_set_role_permissions

This procedure sets permissions for the xls_users, xls_developers, and xls_formats roles.

The procedure grants access to the configuration tables to the xls_users role.
These tables are the required run-time objects shipped with SaveToDB Framework 8.11.

Members of the xls_developers role have full access on the xls schema, including all new objects of the SaveToDB Framework 9.

It also grants access on the xls.formats table to members of the xls_formats role.

xls.xl_delete_translation

This procedure deletes rows of xls.view_all_translations.

ParameterDataTypeModeComment
@TABLE_SCHEMAnvarchar(128)INxls.translations.TABLE_SCHEMA
@TABLE_NAMEnvarchar(128)INxls.translations.TABLE_NAME
@COLUMN_NAMEnvarchar(255)INxls.translations.COLUMN_NAME
@LANGUAGE_NAMEchar(2)INxls.translations.LANGUAGE_NAME

See the configuration in the xls.objects table.

xls.xl_export_settings

This procedure exports SaveToDB Framework settings.

ParameterDataTypeModeComment
@parttinyintINNULL - all
1 - xls.objects
2 - xls.handlers
3 - xls.translations
4 - xls.formats
5 - xls.workbooks
@as_exec_importbitIN0 - export as INSERT commands
1 - export as EXEC insert procedure commands
@sort_by_namesbitIN1 - sort by names
0 - sort by id (default)
@schemanvarchar(128)INTarget schema to export settings or NULL to export all settings
@languagechar(2)INxls.translations.LANGUAGE_NAME

Exporting data using this procedure is a better choice.

It uses special import procedures to merge settings correctly.

xls.xl_import_formats

This procedure imports SaveToDB Framework settings into xls.formats.

ParameterDataTypeModeComment
@TABLE_SCHEMAnvarchar(128)INxls.formats.TABLE_SCHEMA
@TABLE_NAMEnvarchar(128)INxls.formats.TABLE_NAME
@TABLE_EXCEL_FORMAT_XMLxmlINxls.formats.TABLE_EXCEL_FORMAT_XML

The procedure is used in the scripts generated by the xls.xl_export_settings procedure.

The procedure tries to update the record first. If the update fails, it inserts a new record.

xls.xl_import_handlers

This procedure imports SaveToDB Framework settings into xls.handlers.

ParameterDataTypeModeComment
@TABLE_SCHEMAnvarchar(20)INxls.handlers.TABLE_SCHEMA
@TABLE_NAMEnvarchar(128)INxls.handlers.TABLE_NAME
@COLUMN_NAMEnvarchar(128)INxls.handlers.COLUMN_NAME
@EVENT_NAMEvarchar(25)INxls.handlers.EVENT_NAME
@HANDLER_SCHEMAnvarchar(20)INxls.handlers.HANDLER_SCHEMA
@HANDLER_NAMEnvarchar(128)INxls.handlers.HANDLER_NAME
@HANDLER_TYPEnvarchar(25)INxls.handlers.HANDLER_TYPE
@HANDLER_CODEnvarchar(max)INxls.handlers.HANDLER_CODE
@TARGET_WORKSHEETnvarchar(128)INxls.handlers.TARGET_WORKSHEET
@MENU_ORDERintINxls.handlers.MENU_ORDER
@EDIT_PARAMETERSbitINxls.handlers.EDIT_PARAMETERS

The procedure is used in the scripts generated by the xls.xl_export_settings procedure.

The procedure tries to update the record first. If the update fails, it inserts a new record.

xls.xl_import_objects

This procedure imports SaveToDB Framework settings into xls.objects.

ParameterDataTypeModeComment
@TABLE_SCHEMAnvarchar(128)INxls.objects.TABLE_SCHEMA
@TABLE_NAMEnvarchar(128)INxls.objects.TABLE_NAME
@TABLE_TYPEnvarchar(128)INxls.objects.TABLE_TYPE
@TABLE_CODEnvarchar(max)INxls.objects.TABLE_CODE
@INSERT_OBJECTnvarchar(max)INxls.objects.INSERT_OBJECT
@UPDATE_OBJECTnvarchar(max)INxls.objects.UPDATE_OBJECT
@DELETE_OBJECTnvarchar(max)INxls.objects.DELETE_OBJECT

The procedure is used in the scripts generated by the xls.xl_export_settings procedure.

The procedure tries to update the record first. If the update fails, it inserts a new record.

xls.xl_import_translations

This procedure imports SaveToDB Framework settings into xls.translations.

ParameterDataTypeModeComment
@TABLE_SCHEMAnvarchar(128)INxls.translations.TABLE_SCHEMA
@TABLE_NAMEnvarchar(128)INxls.translations.TABLE_NAME
@COLUMN_NAMEnvarchar(128)INxls.translations.COLUMN_NAME
@LANGUAGE_NAMEchar(2)INxls.translations.LANGUAGE_NAME
@TRANSLATED_NAMEnvarchar(128)INxls.translations.TRANSLATED_NAME
@TRANSLATED_DESCnvarchar(1024)INxls.translations.TRANSLATED_DESC
@TRANSLATED_COMMENTnvarchar(2000)INxls.translations.TRANSLATED_COMMENT

The procedure is used in the scripts generated by the xls.xl_export_settings procedure.

The procedure tries to update the record first. If the update fails, it inserts a new record.

xls.xl_import_workbooks

This procedure imports SaveToDB Framework settings into xls.workbooks.

ParameterDataTypeModeComment
@NAMEnvarchar(128)INxls.workbooks.NAME
@TEMPLATEnvarchar(255)INxls.workbooks.TEMPLATE
@DEFINITIONnvarchar(max)INxls.workbooks.DEFINITION

The procedure is used in the scripts generated by the xls.xl_export_settings procedure.

The procedure tries to update the record first. If the update fails, it inserts a new record.

Contents

This website is using cookies. By continuing to browse, you give us your consent to our use of cookies as explained in our Cookie Policy.