The Flower of Evil
asp.net & XML Web Service

导航

 
第一种: "Data Source=Aron1;Initial Catalog=pubs;User Id=sa;Password=asdasd;" 就行了
Data Source:你机子的IP
Initial Catalog:数据库名
User Id:SQL用户名
Password:SQL用户密码
------------------------------------------------------------------------

第二种: string ConStr=@"Data Source=localhost;Initial Catalog=Northwind;Integrated Security=SSPI;"

详细内容见网址:
http://www.connectionstrings.com
http://www.daima.com.cn/Info/34/Info34511


server=(local)\NetSDK;"+"Integrated Security=true;database=Northwind

针对上个问题:
NetSDK是.NET SDK在MSDE 2000中的实例名。
请参考:http://support.microsoft.com/kb/311762/zh-cn



Integrated Security
- 或 -
Trusted_Connection
 'false' 当为 false 时,将在连接中指定用户 ID 和密码。当为 true 时,将使用当前的 Windows 帐户凭据进行身份验证。
可识别的值为 true、false、yes、no 以及与 true 等效的 sspi(强烈推荐)。
——————————————来源——————————————
http://blog.joycode.com/ghj/articles/15312.aspx
posted on 2005-11-06 18:12  The Flower of Evil  阅读(219)  评论(0)    收藏  举报