Inserting and Importing SQL Scripts

InstallShield 2022

Project:This information applies to the following project types:

Basic MSI
DIM
InstallScript
InstallScript MSI

InstallShield enables you to reuse SQL script files (.sql) in multiple projects. You can insert or import script files into a project through the SQL Scripts view:

Inserting a script file creates a link to the script file in its current location.
Importing a script file copies the script file to the folder containing the script files for your project. The script files that you import can be stored somewhere on your system, or they can be stored in a repository.

Inserting SQL Script Files

To insert a SQL script file:

1. In the View List under Server Configuration, click SQL Scripts.
2. In the SQL Scripts explorer, add a SQL connection if you have not already done so.
3. Right-click the SQL connection and then click Insert Script Files. The Open dialog box opens.
4. Select the SQL script file (.sql) that you want to insert.
5. Click Open.

Importing SQL Script Files

To import a SQL script file:

1. In the View List under Server Configuration, click SQL Scripts.
2. In the SQL Scripts explorer, add a SQL connection if you have not already done so.
3. Right-click the SQL connection and then click Import Script Files. The Import SQL Script Files Dialog Box opens.
4. Do one of the following:
In the Repository Items box, click the SQL script file (.sql) that you want to add to your project.
If the script file that you want to import is not stored in the repository, click the browse button to select it.
5. Click OK.

When you insert or import a new script to your project, InstallShield adds a new component for the script. You must associate the script with a feature. If one does not exist, the Create a New Feature dialog box opens when you add the SQL script, prompting you to create a new feature. You can change the script-feature association later by using the Select Features the SQL Script Belongs to area on the General tab in the SQL Scripts view for the SQL script.

See Also