在c#或wpf Devexpress中使用SQLOLEDB

时间:2017-05-11 13:14:03

标签: c# wpf sqloledb

刚碰到https://social.msdn.microsoft.com/Forums/sqlserver/en-US/0ff7f210-7697-431b-9e6b-0f2e10f4c031/sql-2016-slow-connection-using-server-name-fast-using-127001?forum=sqlsetupandupgrade

是否可以简单地在c#程序中使用.net并简单地获得这种性能?

为了使用这个提供程序,或者更复杂的东西,这是连接的变化吗?

成功:Provider = SQLOLEDB;数据源= :: 1;集成安全性= SSPI 经过时间:00:00:00.0015378

以下是我们现在的工作方式:                SqlCommand命令=                     新的SqlCommand(queryString,连接);                 connection.Open();

            SqlDataReader reader = command.ExecuteReader();

            // Call Read before accessing data.
            while (reader.Read())
            {
              ...
            }

            // Call Close when done reading.
            reader.Close();

这是连接字符串: Server = ...; Database = ...; Uid = ...; Pwd = ...; Encrypt = True; TrustServerCertificate = true; Asynchronous Processing = true; MultipleActiveResultSets = True

0 个答案:

没有答案