SQL Server connection string Asynchronous Processing=true

前端 未结 5 2060
青春惊慌失措
青春惊慌失措 2020-12-15 08:10

I am using .Net 2.0 + SQL Server 2005 Enterprise + VSTS 2008 + C# + ADO.Net to develop ASP.Net Web application.

My question is, if I am using Asynchronous Proc

5条回答
  •  忘掉有多难
    2020-12-15 08:43

    Begining with .NET Framework 4.5, Asynchronous Processing property is ignored, thus it's unnecessary to include it.

    Quote:

    Prior to .NET Framework 4.5, asynchronous programming with SqlClient was done with the following methods and the Asynchronous Processing=true connection property:

    1. System.Data.SqlClient.SqlCommand.BeginExecuteNonQuery
    2. System.Data.SqlClient.SqlCommand.BeginExecuteReader
    3. System.Data.SqlClient.SqlCommand.BeginExecuteReader

    This functionality remains in SqlClient in .NET Framework 4.5.

    Beginning in the .NET Framework 4.5, these methods no longer require Asynchronous Processing=true in the connection string.

    For more information, refer to below links:

    • SqlConnectionStringBuilder.AsynchronousProcessing Property
    • Asynchronous Programming

提交回复
热议问题