Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

how can i check whether sql server 2008 is installed or not in C# .net window application ??

Posted on 2011-02-16
5
Medium Priority
?
735 Views
Last Modified: 2012-06-27
i am creating C#.net window application , in my application i want to check whether sql server 2008 is installed or not (when my application start) ??

and if sql server 2008 is not installed in my system then it will give appropriate message , but how can i do this ?
0
Comment
Question by:Parth48
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 

Author Comment

by:Parth48
ID: 34909077
i want to check it when my application start and check it through C# coding ....
0
 
LVL 9

Accepted Solution

by:
rawinnlnx9 earned 2000 total points
ID: 34909146
http://stackoverflow.com/questions/1221503/detect-local-sql-server-installation-with-c32-bit-as-well-as-64-bit

The above has many different examples and I bet the registry check should work fine for you.
0
 
LVL 8

Expert Comment

by:cubaman_24
ID: 34915945
Hello:
You have to choices from my point of view.
One is searching in windows registry.  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\100.
Another choice, more complex maybe, is adding a launch condition to your msi installation, in case you have one.

Best regards.
0
 

Author Comment

by:Parth48
ID: 34924988
hi @rawinnlnx9:-

i got the below error , what can i do ?

"The type 'Microsoft.SqlServer.Management.Common.IAlterable' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.SqlServer.ConnectionInfo, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'."
0
 

Author Comment

by:Parth48
ID: 34924992
where i can download Microsoft.SqlServer.Management.Common dll ??
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question