|
-
Jan 21st, 2016, 05:15 PM
#1
[RESOLVED] SqlDataSourceEnumerator.Instance
I'm trying to locate SQL Server (Express or not) instances on either a local system or a LAN. I have some code that does this written in VS2010. For anyone interested, the code looks like this:
Code:
Dim dSourceInstanct = SqlDataSourceEnumerator.Instance
mSourcesDT = dSourceInstanct.GetDataSources
For Each dr As DataRow In mSourcesDT.Rows
'Stuff done here
Next
This is working fine on a couple computers. However, I just got a new system and installed VS2010 and VS2015. The same program in VS2010 returns an empty datatable, which means that it found no servers. I found this out when I tried to copy that code into a new program in VS2015 and found no servers. There are at least two local servers.
One of the possible issues has to do with Windows Firewall blocking certain ports. I've explicitly opened those ports, and tried with Windows Firewall OFF (though not a perfect test of the latter), without success. I was then searching the web looking for something else to try and found this page:
https://connect.microsoft.com/Visual...-framework-4-x
The title talks about this being an issue with Windows 10, which isn't my problem as I'm running Windows 7 on the new computer (we aren't allowed to have Win10). However, look at the comments. People are saying that installing VS2015 causes the enumeration method to fail. That's pretty bad, but I'm at a loss as to how to confirm this. If VS2015 is installing something that screws up the enumeration, then installing VS2015 would cause the working programs on my other computers that don't have VS2015 to fail. That would be a definitive test, it's just that I don't really want that to happen.
Does anybody have any information on this?
My usual boring signature: Nothing
 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|