Revenera logo

Here’s a great tip for using the SQLBrowse Dialog:

When you add connections in the SQL Scripts view in InstallShield, your installation displays the SQLLogin dialog at run-time. When end users click the Browse button next to the target server field on the dialog, the SQLBrowse dialog opens; this dialog provides a list of available servers on local and network machines. Sometimes the SQLBrowse dialog provides a shorter list of servers than other database client tools such as Microsoft SQL Server Management Studio do. This is because installations that are created in InstallShield create the list using the browse method of the ODBC driver manager, and the result relies on the performance and discoverability of an ODBC driver. Installations that are created in InstallShield use the SQL Server ODBC driver by default to create a list of Microsoft SQL Server instances. If you switch to use a newer release of the driver or a different technology such as the SQL Native Client ODBC driver by following the steps below, the SQLBrowse dialog may provide more available servers.

1.  Open your InstallShield installation project.
2.  In the View List under Additional Tools, open the Direct Editor.
3.  In the Tables explorer, click the ISSQLDBMetaData table.
4.  Find the MSSQLServer record.
5.  The default value of the DsnODBCName field is “{SQL Server}”. Change it to the following value:
    “{SQL Native Client}”
6.  Rebuild your installation.

The SQL Server Native Client ODBC driver may not be installed on target systems. Therefore, you may want to use the Redistributables view to add the InstallShield prerequisite for the SQL Server Native Client to your installation in order to ensure that the SQLBrowse dialog works properly.

InstallShield icon

InstallShield

Create native MSIX packages, build clean installs, and build installations in the cloud with InstallShield from Revenera.

Note that in some cases, the SQLBrowse dialog  may not list all of the available servers. Only servers that are on the same network are listed. The list may even be different on consecutive calls because of timeouts and high network traffic. Another factor that may determine whether a server is listed is the network infrastructure itself, since broadcast packets do not usually traverse routers.

Microsoft SQL Server uses the SQL Server Browser service to enumerate instances of the database engine that are installed on the computer. The ODBC driver manager requests the information by sending a UDP message to the SQL Server Browser service through port 1434. If the SQL Server Browser service is not running or UDP port 1434 is blocked by a firewall, instances are not listed in the SQLBrowse dialog.

In addition, some instances may be marked as hidden. Such instances are not listed in the SQLBrowse dialog. For example, for Microsoft SQL Server 2005 and later, the HideInstance flag might be set, or the HideServer option (the SQL Server 2000 style of hiding instances) may be set through the server network utility.

As always, if you have comments or suggestions – please let us know!