Solved

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

Posted on 2011-02-16
5
728 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
where i can download Microsoft.SqlServer.Management.Common dll ??
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

763 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

6 Experts available now in Live!

Get 1:1 Help Now