This page allows you to configure a SQL connection.

General

Connection Type

Select the SQL database server type you want to connect to. The following SQL servers are available:

  • Microsoft SQL Server / MSDE
  • MySQL Server
  • Postgre SQL Server
  • Oracle SQL Server

Connection Mode

You can connect to the SQL server through an:

  • ODBC Driver
  • ODBC Data Source

ODBC Driver/Data Source

Specify the ODBC Driver or Data Source Name. Use the [ Edit... ] button to insert a reference to a property.

NoteThe ODBC Driver/Data Source combo will be populated with the configured ODBC drivers or Data Sources in the project as well as the available ODBC drivers or Data Sources on your machine.

TipIt is recommended to use an Unicode compatible ODBC driver.

Server

Specify the server host name. Use the [ ... ] button to insert reference to a property.

ImportantIf the database server is located on the target machine on which the package is installed you can use localhost. For a Microsoft SQL Server connection use (local) instead. For a Oracle SQL Server connection use OracleServer instead.

Port

Specify the connection port. Use the [ ... ] button to insert a reference to a property.

Login timeout

Set the login timeout interval (in seconds) for this database connection. A value of "0" (zero) means the login timeout is disabled, and the connection will wait indefinitely for a server response. The range tolerance for this value is dependent on the specific ODBC driver used and its standard compliance / implementation.

Connection and all its scripts are verbose

When using the verbose mode for an SQL connection, if an error occurs when connecting or during the execution of one of its SQL scripts, a dialog box will be shown containing the ODBC error response.

Authentication

Trusted Connection

Enable this option if you wish an SQL connection to use Windows integrated authentication system. When using a trusted connection the current user's credentials are used.

NoteIn case of connecting to Microsoft SQL Server Desktop Engine (MSDE) you should use a trusted connection.

Username

User name for the database server.

Password

User password for the database server.

NoteThis password is ignored if you set a password property.

Confirm Password

Confirm user password.

NoteThe supplied password will be stored securely (encrypted) both in the project file and the MSI package.

Use a property to set password

The property used at install time if you want the password to be set by the user. Use the [ ... ] button to select it.

Catalogue

Database

Specify the name of the database you want to use.

Create database if it does not exist

Using this option will ensure the creation of the database if it doesn't exist.

ImportantThe Catalogue option is available only when connecting to the database server through an ODBC driver.

When you connect through a Data Source the following attributes have to be configured in the ODBC Data Source:

  • Server
  • Port
  • Database

All this information can be collected with the Advanced Installer MSI dialog “SQLConnectionDlg”. You can add this dialog from the Dialog Editor view and customize it or you can create your own. When using a MSI dialog to collect the data, in the formatted edit fields: ODBC Driver/Data Source, Server, Port, Username, Password, Database insert references to those respective Windows Installer properties associated with the MSI dialog edit controls.

NoteThe following fields are of Formatted Type and can be edited with Smart Edit Control:

  • Server
  • Port
  • Username
  • Database

TipWhen using the SQL Scripts functionality and you require to prompt the user for ODBC connection parameters (for an ODBC driver), you might want to test if the connection works before proceeding. This will prevent an installation rollback due to incorrect connection parameters when executing the SQL scripts. Please see Test SQL Connection article for details.

TipYou can choose to let the installing user to pick an SQL Server to connect to, from the available Microsoft SQL Servers on the network. Advanced Installer can automatically browse the network to discover any SQL Server (instances) on-line. Also, you have the possibility of allow the user to select a database from a list of available databases to which the user is allowed to connect . Please see Browse for SQL Servers and Show Databases from an SQL Server articles for details.