all groups > sql server connect > april 2005 >
You're in the

sql server connect

group:

Unable to connect question



Unable to connect question M Keeton
4/20/2005 4:01:02 AM
sql server connect: I have a VB.NET application which connects to SQL Server using ADO.
The problem I have is that I need the application to detect if SQL Server
has not yet been installed on the local machine and if so give the user the
option to run the MSDE installation.

When connecting I get get the "SQL Server does not exist or access is
denied" message out but this could mean that SQL Server is not installed or
that the connection properties have just been entered incorrectly.

Is there any way to specifically check if SQL Server is installed from
within my VB.NET application.

Thanks in advance for any help.
--
Re: Unable to connect question M Keeton
4/20/2005 6:03:08 AM
Thanks for that.
Do you know if theres a sub key to "HKLM\Software\Microsoft\Microsoft SQL
Server" that I could search for that would give me the names of the available
SQL Server installations? This would be usefull as it would allow me to check
if my instance has already been installed (and would therefore tell me that
the connection error was more to do with the connection settings).

[quoted text, click to view]
Re: Unable to connect question Vikram Vamshi
4/20/2005 10:33:37 AM
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL
Server\InstalledInstances
Is this what you are looking for?
--
Vikram Vamshi
Eclipsys Corporation
[quoted text, click to view]

Re: Unable to connect question Jacco Schalkwijk
4/20/2005 1:37:27 PM
You can check the registry for the existence of the
"HKLM\Software\Microsoft\Microsoft SQL Server" node to find if SQL Server is
already installed. Strictly speaking, you should give your users the option
to install MSDE even if an installation of SQL Server has been found, as it
can be an installation of MSDE by a different application than your own, and
sharing that MSDE instance between applications might cause problems, for
example conflicting database names.

--
Jacco Schalkwijk
SQL Server MVP


[quoted text, click to view]

AddThis Social Bookmark Button