cancel
Showing results for 
Search instead for 
Did you mean: 
MelBaz
Pilgrim

Multiple SQLLogin Dialogs

Hello
In my install shield project there are two SQL connections; I want to display SQLLogin Dialog for each.
How can this be done?
Project info:
Basic MSI Project
Install Shield 2008

thanks alot

Labels (1)
0 Kudos
21 Replies
hidenori
Pilgrim

Re: Multiple SQLLogin Dialogs

InstallScript and InstallScript MSI projects will display One SQL Login dialog for every SQL Server connection. Basic MSI projects will display One SQL Login dialog only, 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. To display 2 SQL connection dialogs at runtime, one for each connection, do the following:
[LIST=1]
  • Add 2 SQLConnections to the SQL Servers view.
  • For every field that is different between the 2 connections, assign a unique property name. For example, if these 2 connections connect to 2 different servers but the database name and the authentication information is the same, then create a new property for the Server name. Assign it to the second connection from the advanced tab.
  • Add the property: IS_SQLSERVER_CONNECTIONS_TO_VALIDATE
  • Go to the Dialog editor and expand the SQLLogin dialog.
  • Add the following event to the Next button and place it before the DoAction event:
    [IS_SQLSERVER_CONNECTIONS_TO_VALIDATE] 1
    where is the name of the second connection you want to validate.
  • Rename SQLLogin to SQLLogin2.
  • Export SQLLogin2 to a dialog file.
  • Rename SQLLogin2 to SQLLogin.
  • Change of the event you added to where is the name of the first connection you want to validate.
  • Import SQLLogin2 from the dialog file you exported earlier.
  • On the English node(or whatever language you are working in) of SQLLogin2, change any control you specified a new value for 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 cboServers to the property you created in step 2.
  • Change the event for the Next button of the SQLLogin dialog to display the SQLLogin2 dialog.
  • Change the event for the Next button of the SQLLogin2 dialog to display the SetupType dialog, and the Back button to display the SQLLogin dialog.
  • Change the event for the Back button of the SetupType dialog to display the SQLLogin2 dialog.

    These same steps could be used to add 3 or more SQLLogin2 dialogs.
  • 0 Kudos
    MelBaz
    Pilgrim

    Thanks

    Smiley Surprised Thanks alot
    0 Kudos
    MelBaz
    Pilgrim

    it worked but the Data cataloge browse button works wrong

    :confused:

    i dont know why .........
    0 Kudos
    hidenori
    Pilgrim

    Re: Multiple SQLLogin Dialogs

    Please try this:

    [LIST=1]
  • Add the following event to the BtnDbBrowse button on the SQLLogin dialog and place it before the DoAction event:
    [IS_SQLSERVER_CONNECTIONS_TO_VALIDATE] 1
    where is the name of the first connection you want to validate

  • Add the following event to the BtnDbBrowse button on the SQLLogin2 dialog and place it before the DoAction event:
    [IS_SQLSERVER_CONNECTIONS_TO_VALIDATE] 1
    where is the name of the second connection you want to validate.
  • 0 Kudos
    Sayantan
    Pilgrim

    Re: Multiple SQLLogin Dialogs

    hidenori wrote:
    InstallScript and InstallScript MSI projects will display One SQL Login dialog for every SQL Server connection. Basic MSI projects will display One SQL Login dialog only, 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. To display 2 SQL connection dialogs at runtime, one for each connection, do the following:
    [LIST=1]
  • Add 2 SQLConnections to the SQL Servers view.
  • For every field that is different between the 2 connections, assign a unique property name. For example, if these 2 connections connect to 2 different servers but the database name and the authentication information is the same, then create a new property for the Server name. Assign it to the second connection from the advanced tab.
  • Add the property: IS_SQLSERVER_CONNECTIONS_TO_VALIDATE
  • Go to the Dialog editor and expand the SQLLogin dialog.
  • Add the following event to the Next button and place it before the DoAction event:
    [IS_SQLSERVER_CONNECTIONS_TO_VALIDATE] 1
    where is the name of the second connection you want to validate.
  • Rename SQLLogin to SQLLogin2.
  • Export SQLLogin2 to a dialog file.
  • Rename SQLLogin2 to SQLLogin.
  • Change of the event you added to where is the name of the first connection you want to validate.
  • Import SQLLogin2 from the dialog file you exported earlier.
  • On the English node(or whatever language you are working in) of SQLLogin2, change any control you specified a new value for 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 cboServers to the property you created in step 2.
  • Change the event for the Next button of the SQLLogin dialog to display the SQLLogin2 dialog.
  • Change the event for the Next button of the SQLLogin2 dialog to display the SetupType dialog, and the Back button to display the SQLLogin dialog.
  • Change the event for the Back button of the SetupType dialog to display the SQLLogin2 dialog.

    These same steps could be used to add 3 or more SQLLogin2 dialogs.


  • Any one can tell me how to Add the following event to the Next button and and how to place it before the DoAction event:
    [IS_SQLSERVER_CONNECTIONS_TO_VALIDATE] 1
    where is the name of the second connection you want to validate.

    Because i could not edit dialog box code except its layout from user interface menu.
    0 Kudos
    hidenori
    Pilgrim

    Re: Multiple SQLLogin Dialogs

    You need to select the Dialog Behavior node under the SQLLogin dialog, and select the Next control from the table of the controls in the middle pain. In the right pain, you can add a new control event by clicking the last row.

    Hope that helps.
    0 Kudos
    Sayantan
    Pilgrim

    Re: Multiple SQLLogin Dialogs

    hidenori wrote:
    You need to select the Dialog Behavior node under the SQLLogin dialog, and select the Next control from the table of the controls in the middle pain. In the right pain, you can add a new control event by clicking the last row.

    Hope that helps.


    Hi,

    Thanks for your quick response but sorry i could not get it.......
    Please keep it in your mind I am not an expert on that....

    I could not find any dialog Behavior node there ........
    when i right click on the sqlserverdialog form it gives me edit option along with some export from file etc. option
    and where from i can only change its control. properties....nothing else.....

    I basically want to see its scripting code of that form.....

    where I want to add my own check box option before the connection string

    1) For MS SQL Server
    2) For My SQL

    and want to toggling the connection string value according to user choice....

    Please help me out how could i achieved that.....
    0 Kudos
    hidenori
    Pilgrim

    Re: Multiple SQLLogin Dialogs

    Which project type are using an InstallScript project or an InstallScript MSI project? The instruction provided in this thread is for Basic MSI projects.
    0 Kudos
    Sayantan
    Pilgrim

    How to modify dialog behavior in Installshield 2008 Professional edition

    hidenori wrote:
    Which project type are using an InstallScript project or an InstallScript MSI project? The instruction provided in this thread is for Basic MSI projects.


    I am working on Installscript MSI Project,and i could not find the Dialog Behavior link there only i can see the Edit Dialog Layout link.

    I am using Installshield 2008 Professional edition (ver. 14).

    That's why i could not modify the action of any dialog contrl.

    Please any one tell me how to modify dialog behavior in my version.
    0 Kudos