The SQL Scripts view enables you to manage SQL scripts in your installation project. The current implementation provides support for the latest versions of Microsoft SQL Server, MySQL, and Oracle.

In the SQL Scripts view, the scripts are organized by connection because a connection must be established before a script can be run. Add a new SQL connection if you want to create an installation that runs directly on a machine containing a SQL database server or on a client machine that could reference a remote server.

For a particular SQL connection, you can also insert a reference to a SQL script in a referencing developer installation manifest (DIM). The referencing DIM will cite the number of scripts associated with the DIM. Refer to the DIM References view for more information on DIMs.

Keep the following important points in mind when adding SQL support to your installation project:

- To run an installation project with SQL support on a Windows 95 or 98 machine, your system will need to include MDAC setup prerequisites.
- For an InstallScript project, if the script execution order matters, make sure you turn on Batch Mode from the root level shortcut menu of the SQL Scripts view.
- For a Basic MSI project, all connections share the same End-User SQL Login dialog. To modify this behavior, go to the Advanced tab of a connection.
- If you want to recreate your script each time you build your project, you can set the Regenerate SQL Script at Build option in the Database Import tab on the script level in the SQL Scripts view. A backup of any existing script file is always saved first.
- Currently, the import database functionality only applies to the Microsoft SQL Server Database. Oracle users should refer to the Oracle Web page on Oracle Database Utilities for information on utilities that may work in conjunction with InstallShield.

If you are migrating any InstallScript or InstallScript MSI projects from any versions of InstallShield prior to InstallShield X, then you need to add the following code to your script because the SQLServer dialogs need to be displayed for the first installation of an application:

    Dlg_SQLServer:
        nResult = OnSQLServerInitialize( nResult );
        if( nResult = BACK ) goto Dlg_SdFeatureTree;

Also, you should note that the object dialogs should refer back to SQLServer in your script. See the sample code below:

    Dlg_ObjDialogs:
        nResult = ShowObjWizardPages( nResult );
        if (nResult = BACK) goto Dlg_SQLServer;