无法检索数据(SQL Server身份验证)

时间:2017-09-05 00:51:39

标签: sql-server wpf visual-studio datasource

我正在尝试使用SQL Server身份验证通过VS2017 Express版中的数据源配置向导连接到在SQL Server 2016 Express版中创建的数据库。 我在SQL Server中创建了用户,当我测试连接完美时,但vs显示错误。同样在服务器属性中,我设置了SQL和Windows身份验证。

Server properties

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

1 个答案:

答案 0 :(得分:0)

我终于找到了解决方案。我在创建连接字符串时检查了复选框记住密码...现在可以检索该用户的数据。在连接字符串中添加了persisted security = true。仍然不知道为什么需要检查,因为我按照示例没有持久的安全性,并且它有效,但在我的电脑上没有。