Summary
Create additional SQLLogin dialogs for additional SQL Connections specified in the SQL Scripts view.
Synopsis
This article lists steps to create additional SQLLogin dialogs for additional SQL Connections specified in the SQL Scripts view. The default Basic MSI project behavior is to display one SQLLogin dialog even if multiple connects are present. The rest of the connections will still be validated, but they will use the authentication information entered at design time.
Discussion
The following steps can be used to display two SQLLogin dialogs at run time, one for each SQL Connection in a project containing two connections:
- Add two SQL Connections in the SQL Scripts view.
- Assign a unique property name for each field that is different between the two connections. For example, if these two connections connect to two different servers, but the database name and the authentication information are the same, create a new property for the Server name and assign it to the second connection from the Advanced tab.
- Add the property:
IS_SQLSERVER_CONNECTIONS_TO_VALIDATEin the Property Manager. - Go to the Dialog editor and expand the SQLLogin dialog's Behavior.
- Add the following event to the Next button and place it before the DoAction event:
Event: [IS_SQLSERVER_CONNECTIONS_TO_VALIDATE]
Argument: Name of second SQL Connection you want to validate - <Connection2>
Condition: 1 - Rename SQLLogin to SQLLogin2.
- Export SQLLogin2 to a dialog file.
- Rename SQLLogin2 to SQLLogin.
- Change <Connection2> of the event you added to <Connection1> where <Connection1> is the name of the first connection you want to validate.
- Import SQLLogin2 from the dialog file you exported earlier. This uses the 'Resolve Conflict' Dialog for any possible conflicts with your installation.
- On the English node (or whatever language you are working in) of SQLLogin2, change any control for which you specified a new value in Step 2 to use that property. For example, if in Step 2 you created a new property for the server name, change the Property of the cboServers control to the property you created in Step 2.
- Modify the behavior of the events on the Next PushButton on the SQLLogon1 to open SQLlogon2 and behave accordingly. The newly created SQLLogon2 dialog is not inserted into the series of dialogs to display until the behavior on the Next button of the prior dialog is modified. Expected result: SQLLogon1 Next button points to SQLogon2 and then modify the SQLLogon2 Next button to point to the following dialog as appropriate.
- Modify the behavior of the events on the Back PushButton control accordingly. For example, the back button on SQLLogon2 is expected to point to the SQLogon1, etc.
The following extra steps are necessary if multiple SQL Servers are used:
- Go to the Dialog Editor and expand the SQLBrowse dialog's Behavior.
- Modify the following event to the Next button to change [
IS_SQLSERVER_SERVER] to the property you created for the additional SQL Server. - Rename SQLBrowse to SQLBrowse2.
- Export SQLBrowse2 to a dialog file.
- Rename SQLBrowse2 to SQLBrowse.
- Revert the change made in Step 2.
- Import SQLBrowse2 from the dialog file you exported earlier.
- Modify the Behavior of SQLLogin2 dialog by expanding its Behavior. Go to the BtnSQLBrowse control's Event table.
- Change the Argument of SpawnDialog from SQLBrowse to SQLBrowse2.
- These same steps could be used to add 3 or more SQLLogin dialogs.
Related Documents
Additional Information
Installscript projects display one SQLLogin dialog for each SQL Connection by default.
The SQLLogin dialog and supporting dialogs are added automatically to a Basic MSI project when a new SQL Connection and SQL Script are added to the SQL Scripts view.
Related Articles
How to Use PowerShell to Create a Self-Signed Digital Certificate to Test Digital Signing with InstallShield 47Number of Views Snow create recognition request (DIS) form 175Number of Views Use InstallChangeFolder Style Dialogs to Allow Users to Set Other Properties 16Number of Views Creating a New User Without Using Logon Information Dialogs 5Number of Views NewDialog Event may Not Fire When Using Multiple NewDialog Events 13Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add additional feedback (optional)
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
|
FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513
(toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367
(toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895
2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Revenera Assistant
Case id: 00001065
Activity: Status change: 2 hours ago