Configure SQL scripts

Installer software, free windows MSI creation tool
Home | Contact | Site Map |
Download Features Java Licensing Purchase Testimonials Support Forums FAQs
USER GUIDE

The SQL Script page

This page allows you to configure SQL Scripts. When adding a script to the project you will be prompted to select a script file from the disk.

General

SQL Script File

Specify the script file. Use [ ... ] button to select it.

Statement separator (SQL Batch file separator)

Specify the separator for the SQL statements.

ImportantBy default this field is empty; if you supply a statement separator (Eg. semicolon ; , or GO ), at run time the SQL script batch file will be automatically split into component statements using the supplied statement separator and each SQL statement will be executed individually. Otherwise, SQL script will be executed as a whole. Format: with the exception of semicolon ; , the statement separator must always begin with a letter and can contain only alpha-numeric characters.

NoteSome Database Servers do not permit executing multiple statements at once. In this case supply a statement separator to indicate that the SQL queries should be executed individually.

Strip comments from SQL script

Removes all comments from the SQL script. (This option also removes SQL comments from your stored procedures, if any.)

Script Execution

Run SQL Script

Select when the SQL script should be executed. You have three options:

  • At install
  • At uninstall
  • During rollback

Warning!The changes made by an SQL Script on a database cannot be undone. Uninstall won't rollback the changes performed by the SQL statements. You will need to supply, if necessary, SQL scripts scheduled to run at uninstall or rollback that will undo changes made by the scripts ran during install.

Script Condition

Condition the execution of the script. Use the [ ... ] button. The Edit Condition Dialog dialog will be displayed allowing you to edit a condition.

TipIf none of the SQL scripts assigned to an SQL connection is to be executed due to their condition or scheduling, that SQL connection will not be triggered.

In case of error

Specify the action that should be taken if an SQL script error is encountered when the script is executed.

NoteIf you choose to go to the next statement of the SQL script file in case of script execution error you will need to supply a statement separator for the SQL script.

SQL Replacements

This section enables you to replace certain sections of your script. These replacements can use installer properties and they are executed when the package is built.

Adding a new SQL replacement

Use the [ Add... ] button, the "Add..." context menu item or press the Ins key while the focus is in the list. The SQL Script Replacement dialog will be displayed allowing you to create a new SQL replacement.

Editing an SQL replacement

Use the [ Edit... ] button, the "Edit..." context menu item or press the Space key while the focus is in the list. The SQL Script Replacement dialog will be displayed allowing you to edit an SQL replacement.

Removing an SQL replacement

Use the [ Remove ] button, the "Remove" context menu item or press the Del key while the focus is in the list.

SQL Script Execution Sequence

The SQL scripts of an SQL connection are executed in the order they appear in the tree (top-down). To change the execution order, move them by drag and drop in the tree.

Disclaimer

ImportantMake sure the SQL code you supply is well-tested before deployment. If errors occur during installation, the changes cannot be undone. This functionality assumes familiarity with SQL syntax. Advanced Installer Technical Support does not provide assistance with debugging SQL statements.

Topics

© 2002 - 2008 Caphyon Ltd. Trademarks belong to their respective owners. All rights reserved.