This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Multiple SQLLogin Dialogs
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 10, 2007
02:59 AM
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
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
(21) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 11, 2007
11:47 AM
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.
[LIST=1]
[IS_SQLSERVER_CONNECTIONS_TO_VALIDATE]
where
These same steps could be used to add 3 or more SQLLogin2 dialogs.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 15, 2007
05:58 AM
😮 Thanks alot
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 26, 2007
06:56 AM
:confused:
i dont know why .........
i dont know why .........
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 26, 2007
01:11 PM
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.
[LIST=1]
[IS_SQLSERVER_CONNECTIONS_TO_VALIDATE]
where
[IS_SQLSERVER_CONNECTIONS_TO_VALIDATE]
where
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 15, 2007
07:15 AM
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
whereis 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]
where
Because i could not edit dialog box code except its layout from user interface menu.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 15, 2007
11:39 PM
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.
Hope that helps.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 16, 2007
05:27 AM
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.....
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 20, 2007
09:12 AM
Which project type are using an InstallScript project or an InstallScript MSI project? The instruction provided in this thread is for Basic MSI projects.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 23, 2007
04:16 AM
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 26, 2007
05:38 AM
Sayantan wrote:
IIf you are using an InstallScript project, you can skip to establish specific connections at run-time. In OnSQLServerInitialize() event, you can add the code conditioning whether to connect to a SQL server or not.
What you need to do is to test the value of szConnection after you get the connection information from SQLRTGetConnectionInfo( szConnection, szServer, szDB, szUser, szPassword ). The szConnection is the connection name that you have specified in the SQL Scripts view. If you have 2 connections named ORACLE_CONNECTION and MS_CONNECTION in the view and you don't want to establish the ORACLE_CONNECTION connection, your code will look like this:
(The lines highlighted in bold are the code you will need to add)
while (nResult = ISERR_SUCCESS)
//Get Default values for connection
SQLRTGetConnectionInfo( szConnection, szServer, szDB, szUser, szPassword );
if( szConnection = "MS_CONNECTION") then
bWinLogin = SQLRTGetConnectionAuthentication( szConnection );
// Display login dialog (without connection name)
nResult = SQLServerSelectLogin( szServer, szUser, szPassword, bWinLogin );
if( nResult = NEXT ) then
//store data in case we need it again
SQLRTPutConnectionInfo( szConnection, szServer, szUser, szPassword );
//try connection
nResult = SQLRTConnect2( szConnection, szServer, bWinLogin, szUser, szPassword, szDatabaseServer );
if( nResult < ISERR_SUCCESS ) then
.
.
.
else
.
.
//Move on to next connection
nCount++;
bNext = TRUE;
nResult = ListGetNextString(listConnections, szConnection);
endif;
else
//BACK
nCount--;
bNext = FALSE;
nResult = ListSetIndex( listConnections, nCount );
ListCurrentString( listConnections, szConnection );
endif;
else
if( bNext = TRUE ) then
//Move on to next connection
nCount++;
nResult = ListGetNextString(listConnections, szConnection);
else
//BACK
nCount--;
nResult = ListSetIndex( listConnections, nCount );
ListCurrentString( listConnections, szConnection );
endif;
endif;
endwhile;
.
Could you pls let me know how would i use this code in my project ,i have 2 separate connection STRING 1) MS SQL SERVER 2) MySQL
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 26, 2007
02:51 PM
In an InstallScript MSI project, you need to modify the OnSQLLogin() event. You can bring the code to your InstallScript by selecting the Before Move Data | OnSQLLogin from the dropdown boxes located upper side of the InstallScript editor.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 22, 2009
06:39 AM
I have an InstallScript MSI project but would like to know what I need to change in OnSQLLogin to get the Oracle bits working. I've read on other posts that the SQL dialogs only work with SQL, if this is the case then how do you test a connection to Oracle?:confused:
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 22, 2009
11:03 AM
Charlieh,
In order to target an Oracle database server, you just need to select the Oracle checkbox in the Requirements tab for your connection in the SQL Scripts view.
In order to target an Oracle database server, you just need to select the Oracle checkbox in the Requirements tab for your connection in the SQL Scripts view.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 23, 2009
01:45 AM
Hi,
Thanks for you reply. That's what I thought but despite the fact I have an Oracle entry within the SQL Scripts section and have the Oracle bit checked no Oracle servers are being listed in the browse button. I did post another thread about how you go about testing an Oracle connection via the script as I have customised SdShowEditDlg3 to ask for the DB, Username & Password as I couldn't get Oracle servers to be listed in SQLLogin. I have the Oracle client on the pc which I run the install so any ideas why I can't see Oracle servers?
Thanks for you reply. That's what I thought but despite the fact I have an Oracle entry within the SQL Scripts section and have the Oracle bit checked no Oracle servers are being listed in the browse button. I did post another thread about how you go about testing an Oracle connection via the script as I have customised SdShowEditDlg3 to ask for the DB, Username & Password as I couldn't get Oracle servers to be listed in SQLLogin. I have the Oracle client on the pc which I run the install so any ideas why I can't see Oracle servers?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 23, 2009
04:15 AM
More info for you. The machine I run my install on has SQL and Oracle installed on it and it seems to be only listing the SQL servers. Is this supposed to happen? My project type is Installscript msi and I created a new msi install with just an oracle entry in the SQL Scripts view and when I ran that install on my pc it listed nothing in the Database server dropdown or in the browse option, what am I missing?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 23, 2009
10:29 AM
Due to a technical limitation, only Oracle service names that are configured in the local tnsnames.ora will be listed in the SQLBrowse dialog. If you configure tnsnames.ora correctly and you don't see the service names on the SQLBrowse dialog in your setup, please try this:
[LIST=1]
Create an InstallScript MSI project.
Add a connection in the SQL Scripts view.
Select only the Oracle checkbox in the Requirements view.
Build and run the setup.
On the SQLLogin dialog, click the Browse button next to the Server Name field.
Observe.
[LIST=1]
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 27, 2009
02:54 AM
I have followed your instructions and I still can't get any oracle servers to appear in the browse window. How would I know if my tnsnames.ora was correctly configured? :confused:
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 28, 2009
10:39 AM
You can check it by creating a DSN as follows:
[LIST=1]
Install Oracle ODBC driver provided from Oracle.
Open the Administrative Tools | Data Source (ODBC) from the Control Panel.
Click the Add button in the User DSN tab.
Select the "Oracle in OraDb10g_home1" and click the Finish button.
Check to see if you have a list of service names in the TNS Service Name dropdown list.
[LIST=1]
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 29, 2009
02:40 AM
Hi Hidenori,
Thanks for taking the time to respond again, I've tried those 5 steps and I do see the 2 TNS Service names in my dropdown but when I run the install again they are not listed, do you have any more ideas?
Failing this, please could you tell me what connection string I could use in the script to connect to an Oracle DB as I have customised the SDShowEditDlg3 which I thought I could use instead., cheers, Charlie :confused:
Thanks for taking the time to respond again, I've tried those 5 steps and I do see the 2 TNS Service names in my dropdown but when I run the install again they are not listed, do you have any more ideas?
Failing this, please could you tell me what connection string I could use in the script to connect to an Oracle DB as I have customised the SDShowEditDlg3 which I thought I could use instead., cheers, Charlie :confused:
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 29, 2009
07:24 AM
To add to this I've also followed the points you made in this thread and the lst of Oracle servers still doesn't appear, I am able to connect with URL //host: [port] [/service name] though:
http://community.installshield.com/showthread.php?t=186706&page=2&highlight=ORACLE_HOME
http://community.installshield.com/showthread.php?t=186706&page=2&highlight=ORACLE_HOME
![](/skins/images/CC38E504FC9E1309DC48ACFEB4925670/responsive_peak/images/icon_anonymous_message.png)