当前位置: 首页 > 编程语言 > C#

我尝试使用Windows Universal PlatformApp连接到SQL Server 2008R2时出现System.Data.SqlClient.SqlException分享

时间:2023-04-11 03:20:59 C#

C#学习教程:使用WindowsUniversalPlatformApp连接SQLServer2008R2出现System.Data.SqlClient.SqlExceptionServer2008R2您好,当我尝试使用Windows通用平台应用程序中的System.Data.SqlClient连接到MicrosoftSQLServer2008R2时,出现以下异常:System.Data.SqlClient.SqlException:'已成功建立与服务器的连接,但在登录过程中发生错误。(Provider:TCPProvider,Error:0-Operationcompletedsuccessfully)'这是我的连接字符串,我正在使用SQL身份验证:stringconnectionString="{DataSource=xxx.xxx.xxx.xxx;InitialCatalog=TheDatabase;IntegratedSecurity=false;UserID=user;Password=Password}"这是我尝试连接到2016SQLServer时的代码:using(SqlConnectionconnection=newSqlConnection(connectionString)){connection.Open()上抛出异常需要考虑的事项:该线程解释了相同的问题:链接到问题CanServicePack3forSQLServer2008R2help?是否有使2008R2与WUP一起工作的解决方案或更好的方法?安装2008R2ServicePack解决了这个问题。我尝试使用2008R2Express在我的本地PC上重现该问题。我重现了这个问题,并且在我更新到2008R2ServicePack2Express之后一切都完美无缺。我将在生产中安装ServicePack3并在它工作时更新你上面是C#学习教程:当我尝试使用WindowsUniversalPlatformApp连接到SQLServer2008R2时出现System.Data.SqlClient.SqlException它很有用并且需要了解有关C#学习教程的更多信息。希望大家多多关注。本文收集自网络,不代表立场。如涉及侵权,请点击右侧联系管理员删除。如需转载请注明出处: