如何设置网络字符串 [英] how to set the network string
本文介绍了如何设置网络字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
i希望从另一个系统(如客户端服务器)访问数据库。
i am使用以下字符串这次。(在本地系统中使用)
string connstr = @Server = .\SQLEXPRESS; Initial Catalog = DB;集成安全性=真;最大池大小= 100;
请告诉我在我的字符串中添加的更改是什么。
解决方案
将其更改为;
string connstr = @Server = NAME_OF_YOUR_SERVER_HERE \ SQLEXPRESS; Initial Catalog = DB; Integrated Security = True; Max Pool尺寸= 100;
希望这会有所帮助,
Fredrik
< blockquote>正如Fredrik所说,你在 \ SQLEXPRESS
之前用您所在服务器的名称替换。
连接到。 。
是引用本地计算机的简便方法。注意
尝试
string con = @Server = serverip(127.0.0.1)(对于本地)\ SQLEXPRESS;初始目录= DB; Integrated Security = True; Max Pool Size = 100;
Hi,
i want to access the database from another system (like client-server ).
i am using the following string at this time.(which is used in local system)
string connstr = @"Server=.\SQLEXPRESS ;Initial Catalog=DB;Integrated Security=True; Max Pool Size=100";
Please tell me what is the change will be added in my string.
解决方案
Change it to;
string connstr = @"Server=NAME_OF_YOUR_SERVER_HERE\SQLEXPRESS ;Initial Catalog=DB;Integrated Security=True; Max Pool Size=100";
Hope this helps,
Fredrik
As Fredrik has stated, you replace the.
before the\SQLEXPRESS
with the name of the server you are connecting to. The.
is a shorthand way of referring to your local machine. Note
try
string con = @"Server=serverip(127.0.0.1)(for local)\SQLEXPRESS ;Initial Catalog=DB;Integrated Security=True; Max Pool Size=100";
这篇关于如何设置网络字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文