我想显示与 SQL Server Management Studio 相同的服务器名称列表。
当我使用
SqlDataSourceEnumerator instance = SqlDataSourceEnumerator.Instance;
System.Data.DataTable table = instance.GetDataSources();
在返回列表中,服务器名称列表为真,但实例名称为假。在我的 PC 中,服务器名称为[name of pc]\SQLEXPRESS
,但实例名称的返回值为 none。
谢谢你。