如何在c语言中访问通过lan连接的另一个系统的sql server数据库 [英] how can access sql server database of another system connected through lan in c sharp
本文介绍了如何在c语言中访问通过lan连接的另一个系统的sql server数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在c Sharp中访问通过lan连接的另一个系统的sql服务器数据库
how can access sql server database of another system connected through lan in c sharp
推荐答案
在ConnectionString中使用IP地址或PCName
您可以在网上搜索信息
Use IP Address or PCName in your ConnectionString
you may search on net for information
只需如下所示
Simply like below
string constr="data source=IP address of other PC; Initial Catalog=DB name; user id=sa; password=password"
其中userid和密码是另一个PC SQL服务器的用户ID和密码
where userid and password are another''s PC SQL server''s userid and password
这可能对您有所帮助
http://www.vbforums.com/showthread.php?t=555364 [ ^ ]
http://blogs.msdn.com/b/sqlexpress/archive/2005/05/05/415084.aspx [ ^ ]
http://support.microsoft.com/default.aspx?scid=kb;EN- US; 914277 [ ^ ]
This may help u
http://www.vbforums.com/showthread.php?t=555364[^]
http://blogs.msdn.com/b/sqlexpress/archive/2005/05/05/415084.aspx[^]
http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277[^]
这篇关于如何在c语言中访问通过lan连接的另一个系统的sql server数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文