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: SQLServerSelect is listing local SQL Servers in list box when it should not
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
‎Sep 22, 2010
11:51 AM
SQLServerSelect is listing local SQL Servers in list box when it should not
I have an InstallScript MSI project. The install script code in question looks like:
MsiSetProperty(ISMSI_HANDLE,"IS_SQLSERVER_REMOTE_ONLY","1");
nResult = SQLServerSelect(szMsg, svServer);
Setting the IS_SQLSERVER_REMOTE_ONLY property is supposed to show only the remote SQL Servers in the SQL Server browse combo box and list box controls. In my case it lists the local SQL servers in the list box. If I hit the browse button it only shows remote SQL Servers. Is this a bug or is there something else I have to do to prevent the local SQL Servers showing up in the list box?
MsiSetProperty(ISMSI_HANDLE,"IS_SQLSERVER_REMOTE_ONLY","1");
nResult = SQLServerSelect(szMsg, svServer);
Setting the IS_SQLSERVER_REMOTE_ONLY property is supposed to show only the remote SQL Servers in the SQL Server browse combo box and list box controls. In my case it lists the local SQL servers in the list box. If I hit the browse button it only shows remote SQL Servers. Is this a bug or is there something else I have to do to prevent the local SQL Servers showing up in the list box?
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 22, 2010
04:24 PM
Please make sure that your cutom action setting the IS_SQLSERVER_REMOTE_ONLY property is executed before ISSQLServerFilteredList action in the InstallUISequence.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 22, 2010
05:33 PM
I am confused by your answer. Let me claify. I don't use custom actions. I added this code to the OnFirstUIBefore() InstallScript. I can't even find the ISSQLServerFilteredList action in the InstallUISequence. The setting seems to work for the browse button on the SQLServerSelect Dialog, it only shows remote servers, but the list box looks like it is intialized with a list of local SQL Server Instances. This sounds like a bugs to me.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 23, 2010
09:15 AM
Sorry about the confusion. The ISSQLServerFilteredList action is only used for Basic MSI projects. Also, the Server dropdown list is designed to only display the local SQL Servers and the SQL Servers registered for the DSNs on your machine. The IS_SQLSERVER_REMOTE_ONLY property does not affect the list.
In order to change the behavior, you can modify the code for the dialog so that the Server dropdown list will show the same list as the SQLBrowse dialog. If you are calling the SQLServerSelectLogin2 function to display the SQLLogin dialog, copy the implementation of the function from C:\Program Files\InstallShield\2010\Script\Isrt\src\SQLServerSelectLoginDlg.rul to your InstallScript, and then change the second parameter of the SQLRTGetServers2 function call to FALSE in the "case DLG_INIT" block.
Hope that helps.
In order to change the behavior, you can modify the code for the dialog so that the Server dropdown list will show the same list as the SQLBrowse dialog. If you are calling the SQLServerSelectLogin2 function to display the SQLLogin dialog, copy the implementation of the function from C:\Program Files\InstallShield\2010\Script\Isrt\src\SQLServerSelectLoginDlg.rul to your InstallScript, and then change the second parameter of the SQLRTGetServers2 function call to FALSE in the "case DLG_INIT" block.
Hope that helps.