tnomore
Posts: 16
Joined: Wed Oct 31, 2007 5:14 pm

Multiple SqlConnections

Hi.

I am working on an installation package that requires multiple database connections (it must write data to several different databases). I would like to use the built-in support for testing connections, but notice that it is not possible to add more than one SqlConnectionDlg to a single project.

Any suggestions as to how this should be handled?

Is is possible to call the Function TestSqlConnection with parameters representing an entire connection string?

thanks.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

Advanced Installer has by default only one SQLConnectionDlg dialog. However, if you need more than one then you need to recreate it in a custom dialog.

For example, you can copy/paste the controls in the SQLConnectionDlg to a custom dialog and set different properties for them. In one SQL connection you use the properties from the SQLConnectionDlg dialog and in the other SQL connection you use the properties from your custom dialog.

You can read more about the Dialog Editor feature here:
http://www.advancedinstaller.com/user-g ... ditor.html
Note that this feature is available only in an Enterprise project.
Is is possible to call the Function TestSqlConnection with parameters representing an entire connection string?
We have a How-To for this, please take a look:
http://www.advancedinstaller.com/user-g ... ction.html

Note that the properties used in the connection string are the properties set in the SQLConnectionDlg dialog. For your custom dialog you need to set the correct properties (the ones you use for the editboxes).

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”