在Windows 10中获取SQL Server实例 [英] Get SQL Server Instances in Windows 10

查看:240
本文介绍了在Windows 10中获取SQL Server实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些旧的VB.Net代码,多年来我一直在使用这些代码来检索SQL实例.它已经运行了很多年(通过SQL Server 2008、2012和现在的2014).但是我一周前安装了Windows 10,并且(这是我第一次使用此代码)现在它不会返回表中的任何行.是的(我已经阅读了其他相关项目)SQL浏览服务正在运行.

I have some old VB.Net code that I have used for years that retrieves SQL instances. It has worked perfectly for a number of years (through SQL Server 2008, 2012, now 2014). But I installed Windows 10 a week ago and (this is the first time I've used the code since) now it's not returning any rows in the table whatsoever. And yes (I've read the other related items) SQL Browsing service is running).

正在使用的代码直接来自MSDN(我最初在这里找到了)...

The code being used is directly out of MSDN (where I originally found it)...

Dim instance As SqlDataSourceEnumerator = SqlDataSourceEnumerator.Instance
Dim table As System.Data.DataTable = instance.GetDataSources()
DisplayData(table)
Me.LoginName.Enabled = True
Me.LoginPassword.Enabled = True

是的,是的,在有人问之前,我在执行时以调试模式检查了table的内容. count=0行.

And, yes, before anyone asks, I checked the contents of table in debug mode at execution. The rows count=0.

有人知道这是否是Windows 10问题和/或对立即获取实例有什么想法吗?

Does anyone know if this is a Windows 10 issue and/or have any thoughts on what to do to get the instances now?

在此先感谢您的帮助/咨询!

Thanks in advance for any assistance/advice!

推荐答案

老问题,我知道.我只是遇到了同样的问题,但最终还是到了这里.

Old question, I know. I just ran into the same problem and ended up here though.

我通过其他

I found out through other sources that you need to turn on SQL Server Browser service. Tested with SqlDataSourceEnumerator and ODBC32, both now work.

这篇关于在Windows 10中获取SQL Server实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆