简体   繁体   English

连接字符串

[英]Connection String

I have a asp.net application.there is a databinding section to a datagrid.But there have an error.I think it may be in web config-Connection string. 我有一个asp.net应用程序.datagrid有一个数据绑定部分。但是有一个错误。我认为它可能在web config-Connection字符串中。 Connection String is like this 连接字符串是这样的

<add name="ArchitectConnectionString" connectionString="Data Source=192.168.1.15,1433;Network Library=DBMSSOCN;Initial Catalog=Architect;" providerName="System.Data.SqlClient" />

the error is 错误是

Login failed for user ''. 用户“”登录失败。 The user is not associated with a trusted SQL Server connection. 该用户未与受信任的SQL Server连接相关联。

Please help me.. 请帮我..

You need to specify a username/password to the end of the connection string, 您需要在连接字符串的末尾指定一个用户名/密码,

";User ID=UserName;Password=Password"

Or if you are using Windows Auth then 或者,如果您使用的是Windows Auth,则

"Integrated Security=True"

The connection string is expecting a user id and password add the following string to the end of the connection string: 连接字符串需要用户ID和密码,将以下字符串添加到连接字符串的末尾:

String to add: 要添加的字符串:

Userid=myUserID;Password=!12345 Userid = myUserID;密码=!12345

Complete altered string example: 完整的更改字符串示例:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM