在asp.net中访问Sql实例名称 [英] Accessing Sql instance names in asp.net

查看:66
本文介绍了在asp.net中访问Sql实例名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

哪个类用于访问.net应用程序中sql服务器注册的实例名称?在.net应用程序中,有什么方法可以访问通过LAN连接的不同系统上的sql server的注册实例?

Which class is used for accessing sql server registered instance names in .net application? Is there any way to access the sql server''s registered instances on different systems connected through LAN, in .net application???

推荐答案

您可以使用System.Data.SqlClient或诸如实体数据模型之类的东西.您可以使用连接字符串访问特定实例.

另一方面,如果您希望找出在特定计算机/网络上正在运行的实例,就像在浏览更多服务器时Sql Server Management Studio所做的那样,我来看看SMO:

http://msdn.microsoft.com/en/library/ms212724.aspx [ ^ ]
You can either use System.Data.SqlClient or something like an Entity Data Model. You access specific instances using the connection string.

If, on the other hand you wish to find out what instances are running on a particular machine/network just as Sql Server Management Studio does when you browse for more servers, I''d have a look at SMO:

http://msdn.microsoft.com/en/library/ms212724.aspx[^]


这篇关于在asp.net中访问Sql实例名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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