cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
nezisan
Level 3

install 2 databases (and update config)

Hello,
I neede to install two databases for the first one the SQLLogin dialog comes up and then I read the [IS_SQLSERVER_SERVER] and rest to update my connection strings.But for the second which I would like exactly the same to happen I am facing problems what do I need to do to have the SQLLogin dialog re-appear and populate with the new values?

Thanks,
Anastasios
Labels (1)
0 Kudos
(2) Replies
hidenori
Level 17

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 Scripts 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 even 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.

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

    Hope that helps.
  • 0 Kudos
    nezisan
    Level 3

    Thanks Hidenori,
    that was really helpful, but I stil have a problem though.
    It seems that when I put the IS_SQLSERVER_CONNECTIONS_TO_VALIDATE
    the Browse Database doesn't show anything.
    Any chance you know why is that?

    Thanks again,
    Anastasios

    hidenori wrote:
    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 Scripts 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 even 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.

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

    Hope that helps.
  • 0 Kudos