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

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?
Labels (1)
0 Kudos
(3) Replies
hidenori
Level 17

Please make sure that your cutom action setting the IS_SQLSERVER_REMOTE_ONLY property is executed before ISSQLServerFilteredList action in the InstallUISequence.
0 Kudos
jbigley
Level 3

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.
0 Kudos
hidenori
Level 17

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.
0 Kudos