Solved

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

Posted on 2011-02-16
5
729 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
  • 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 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

863 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now