Click here to Skip to main content
15,879,535 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am using SqlDataSourceEnumerator.Instance.GetDataSources() to find if sql instance is installed in my machine or not.

I have installed sql server 2008 in my machine,then uninstalled completely,and it didn't show any error.

SqlDataSourceEnumerator.Instance.GetDataSources() works perfectly in windows 7 or xp to check if sql installed or not.

But when I install and then uninstall sql in windows 8,the code all time returning the instance what was previously installed.
I've checked registry as well as programfiles. Sql is nowhere.

When I reinstall sql it is installing with no error also.

So how SqlDataSourceEnumerator getting instance in windows 8?

If SqlDataSourceEnumerator is not reliable to check if sql installed or not,then how can I detect that by c#.

Mind it I need a procedure for both 64 and 32 bit machine though I'm using wow6432 installer.
Posted
Comments
[no name] 15-Oct-14 7:14am    
http://www.codeproject.com/Questions/827972/sql-uninstallation-problem-in-windows?arn=0

1 solution

Solved by myself.

Actually my machine was in network and it was fetching other machine's sql instance. After disabling network it is now ok.

But in windows xp,though that was in network,it didn't return instance.For windows 7 and 8 it is fetching instances from network.So does this method not fetch instance over network in xp?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900