From 6239039b9dd0f42f427e8673fd1c8de1964c1412 Mon Sep 17 00:00:00 2001 From: Cheena Malhotra Date: Wed, 9 Aug 2023 13:54:19 -0700 Subject: [PATCH 1/2] Update docs to include note about existing issues with Async APIs --- .../Microsoft.Data.SqlClient/SqlCommand.xml | 17 +++++++++++++++++ .../Microsoft.Data.SqlClient/SqlDataReader.xml | 4 ++++ 2 files changed, 21 insertions(+) diff --git a/doc/snippets/Microsoft.Data.SqlClient/SqlCommand.xml b/doc/snippets/Microsoft.Data.SqlClient/SqlCommand.xml index 6aac0a9d42..5c6f2289f2 100644 --- a/doc/snippets/Microsoft.Data.SqlClient/SqlCommand.xml +++ b/doc/snippets/Microsoft.Data.SqlClient/SqlCommand.xml @@ -1698,6 +1698,11 @@ The following example creates a and t ## Remarks For more information about asynchronous programming in the .NET Framework Data Provider for SQL Server, see [Asynchronous Programming](/sql/connect/ado-net/asynchronous-programming). + +> [!NOTE] +> For long running queries on server, you should consider using due to a known issue with canceling queries with cancellation token. Also, consider canceling execution using the method. + + ]]> @@ -1986,6 +1991,10 @@ The following example creates a , and ## Remarks For more information about asynchronous programming in the .NET Framework Data Provider for SQL Server, see [Asynchronous Programming](/sql/connect/ado-net/asynchronous-programming). + +> [!NOTE] +> For long running queries on server, you should consider using due to a known issue with canceling queries with cancellation token. Also, consider canceling execution using the method. + ]]> @@ -2466,6 +2475,10 @@ The following example creates a and t ## Remarks For more information about asynchronous programming in the .NET Framework Data Provider for SQL Server, see [Asynchronous Programming](/sql/connect/ado-net/asynchronous-programming). + +> [!NOTE] +> For long running queries on server, you should consider using due to a known issue with canceling queries with cancellation token. Also, consider canceling execution using the method. + ]]> @@ -2657,6 +2670,10 @@ The following example creates a and t ## Remarks The **XmlReader** returned by this method does not support asynchronous operations. For more information about asynchronous programming in the .NET Framework Data Provider for SQL Server, see [Asynchronous Programming](/sql/connect/ado-net/asynchronous-programming). + +> [!NOTE] +> For long running queries on server, you should consider using due to a known issue with canceling queries with cancellation token. Also, consider canceling execution using the method. + ]]> diff --git a/doc/snippets/Microsoft.Data.SqlClient/SqlDataReader.xml b/doc/snippets/Microsoft.Data.SqlClient/SqlDataReader.xml index b0ce159fbf..89aa86664e 100644 --- a/doc/snippets/Microsoft.Data.SqlClient/SqlDataReader.xml +++ b/doc/snippets/Microsoft.Data.SqlClient/SqlDataReader.xml @@ -1173,6 +1173,10 @@ If the `behavior` parameter of is set to `Default`, reads the entire row before returning the Task. For more information, including code samples, about asynchronous programming in the .NET Framework Data Provider for SQL Server, see [Asynchronous Programming](/sql/connect/ado-net/asynchronous-programming). + +> [!NOTE] +> When reading large data (binary/text), it is recommended to use for optimal performance. + ]]> From 993669ca3865319786e855089874bfd2e442f269 Mon Sep 17 00:00:00 2001 From: Cheena Malhotra <13396919+cheenamalhotra@users.noreply.github.com> Date: Thu, 10 Aug 2023 12:13:18 -0700 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: David Engel --- doc/snippets/Microsoft.Data.SqlClient/SqlCommand.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/snippets/Microsoft.Data.SqlClient/SqlCommand.xml b/doc/snippets/Microsoft.Data.SqlClient/SqlCommand.xml index 5c6f2289f2..8dea0674cc 100644 --- a/doc/snippets/Microsoft.Data.SqlClient/SqlCommand.xml +++ b/doc/snippets/Microsoft.Data.SqlClient/SqlCommand.xml @@ -1700,7 +1700,7 @@ The following example creates a and t For more information about asynchronous programming in the .NET Framework Data Provider for SQL Server, see [Asynchronous Programming](/sql/connect/ado-net/asynchronous-programming). > [!NOTE] -> For long running queries on server, you should consider using due to a known issue with canceling queries with cancellation token. Also, consider canceling execution using the method. +> For long running queries on the server, consider using due to a known issue with canceling queries via a cancellation token. Also, consider canceling execution using the method. ]]> @@ -1993,7 +1993,7 @@ The following example creates a , and For more information about asynchronous programming in the .NET Framework Data Provider for SQL Server, see [Asynchronous Programming](/sql/connect/ado-net/asynchronous-programming). > [!NOTE] -> For long running queries on server, you should consider using due to a known issue with canceling queries with cancellation token. Also, consider canceling execution using the method. +> For long running queries on the server, consider using due to a known issue with canceling queries via a cancellation token. Also, consider canceling execution using the method. ]]> @@ -2477,7 +2477,7 @@ The following example creates a and t For more information about asynchronous programming in the .NET Framework Data Provider for SQL Server, see [Asynchronous Programming](/sql/connect/ado-net/asynchronous-programming). > [!NOTE] -> For long running queries on server, you should consider using due to a known issue with canceling queries with cancellation token. Also, consider canceling execution using the method. +> For long running queries on the server, consider using due to a known issue with canceling queries via a cancellation token. Also, consider canceling execution using the method. ]]> @@ -2672,7 +2672,7 @@ The **XmlReader** returned by this method does not support asynchronous operatio For more information about asynchronous programming in the .NET Framework Data Provider for SQL Server, see [Asynchronous Programming](/sql/connect/ado-net/asynchronous-programming). > [!NOTE] -> For long running queries on server, you should consider using due to a known issue with canceling queries with cancellation token. Also, consider canceling execution using the method. +> For long running queries on the server, consider using due to a known issue with canceling queries via a cancellation token. Also, consider canceling execution using the method. ]]>