cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
GIANGI
Level 4

SQL SQLBrowse and SQL named instances

I am developing a Basic MSI setup.

I have to connect to an Microsoft SQL server (version 2005 or above).

I had used SQLLogin and SQLBrowse dialogs to connect to the SQL server.

If I use "browse" button of SQLLogin SQLBrowse dialog box appears with the list of MS SQL available servers.
But this list is not correct because I have the name of SQL server but not the name of SQL instance.
For example if in my network I have an SQL server named
PC1
with an SQL instance named
SQLEXPRESS
I see in the list a row that indicate
PC1
And not
PC1\SQLEXPRESS
If I choose PC1 and then click next I obtain an error.
If I write PC1\SQLEXPRESS and then I click “next”in SQLLogin dialog everything works.
Is there a property to set to show the names of SQL instances?
Any advice ?

Thank you in advance.

FG
Labels (1)
0 Kudos
(6) Replies
hidenori
Level 17

Please follow the steps below and let me know if you see the instance in question in the ODBC Data Source Administrator:

[LIST=1]
  • Launch the Administrative Tools | Data Sources (ODBC) in the Control Panel.
  • Click Add. The Create New Data Source panel should be displayed.
  • Select “SQL Server” and click Finish. The Create a New Data Source to SQL Server wizard should be displayed.
  • Expand the "Server:" dropdown list and observe.
    Since InstallShield uses the SQL Server ODBC driver to retrieve the list, I would like to check if you see the same result.
  • 0 Kudos
    GIANGI
    Level 4

    Thanks for your answer.
    I made this test. The results are similar but not identical.
    In dropdown list of "add new data source" I see 14 SQL servers names.
    In drop down list of my setup I see 14 SQL servers names.
    One server name is different (in "new data source" list I obtain server PC1 ; in my setup list this server is listed with name: PC1\PC1).
    Another difference is that in my setup Server list I have my local SQL server listed 2 times; in "add new data source" list I have another SQL server listed 2 times.

    These PC s are working on a domain environment.
    I have seen another post where is suggested to use “SQL Native client” in DSNODBCNAME column of ISSQLDBMetaData table.
    Could be a solution?
    Are there any consequences in making this change?

    Thanks.
    FG
    0 Kudos
    hidenori
    Level 17

    Please try the SQL Native Client with your setup and see if the behavior is changed. You need to make sure that the SQL Native Client ODBC driver is installed on your machine before running your setup. Also, the dropdown list in the SQLLogin dialog is designed to only show the local instances and the SQL Servers registered in DSNs. You need to observe the SQLBrowse dialog to verify the result.
    0 Kudos
    GIANGI
    Level 4

    My setup is changed with "SQL Native Client".

    Now I see the names of instance of MS SQL Servers (I see both PC name and PC\instance name in "Browse" servers list).

    Setup list and "New Data Source" list are identical.

    I created a prerequisite module to install "SQL Native Client" in order to use "SQL Native Client" without problems and avoid an empty server list (this prerequisite installs file sqlncli.msi).

    Do you think that there are other things to set to avoid problem?

    Thank you.
    0 Kudos
    hidenori
    Level 17

    That is all you have to do to workaround the problem.
    0 Kudos
    GIANGI
    Level 4

    Thank you for yor help.

    Regards.

    FG
    0 Kudos