我尝试使用Windows Universal PlatformApp连接到SQL Server 2008R2时出现System.Data.SqlClient.SqlException
嗨,当我尝试从Windows通用平台应用程序使用System.Data.SqlClient连接到Microsoft SQL Server 2008R2时,我得到以下exception:
System.Data.SqlClient.SqlException:’已成功与服务器建立连接,但在登录过程中发生错误。 (提供者:TCP提供者,错误:0 – 操作成功完成)’
这是我的连接字符串,我正在使用SQL Authentification:
string connectionString = "{Data Source=xxx.xxx.xxx.xxx; Initial Catalog=TheDatabase;Integrated Security=false;User ID=user;Password=Password}"
当我尝试连接到2016 SQL Server的作品时,这是我的代码:
using (SqlConnection connection= new SqlConnection(connectionString)) { connection.Open(); }
在connection.Open()上抛出了exception
需要考虑的事项:
这个主题解释了同样的问题: 链接到问题
SQL Server 2008R2的Service Pack 3可以提供帮助吗?
是否有解决方案或更好的方法使2008R2与WUP协同工作?
安装2008R2 Service Pack解决了这个问题。 我尝试使用2008R2 Express在我的本地电脑上重现问题。 我重现了这个问题,在我对2008R2 Service Pack 2 Express进行更新后,一切都运行得很完美。
我将在生产中安装Service Pack 3并在其工作时更新您
上述就是C#学习教程:我尝试使用Windows Universal PlatformApp连接到SQL Server 2008R2时出现System.Data.SqlClient.SqlException分享的全部内容,如果对大家有所用处且需要了解更多关于C#学习教程,希望大家多多关注—计算机技术网(www.ctvol.com)!
本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。
ctvol管理联系方式QQ:251552304
本文章地址:https://www.ctvol.com/cdevelopment/1030238.html