Skip to content

Commit

Permalink
docs | Update description for SqlBulkCopy.EnableStreaming (#1886)
Browse files Browse the repository at this point in the history
  • Loading branch information
lcheunglci authored Jan 18, 2023
1 parent 8e9f3c0 commit 080e9e6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions doc/snippets/Microsoft.Data.SqlClient/SqlBulkCopy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,12 @@ The following example uses the same <xref:Microsoft.Data.SqlClient.SqlBulkCopy>
<format type="text/markdown"><![CDATA[
When <xref:Microsoft.Data.SqlClient.SqlBulkCopy.EnableStreaming> is `true`, <xref:Microsoft.Data.SqlClient.SqlBulkCopy> reads from an <xref:System.Data.IDataReader> object using <xref:System.Data.CommandBehavior.SequentialAccess>,
optimizing memory usage by using the <xref:System.Data.IDataReader> streaming capabilities. When it's set to false, the <xref:Microsoft.Data.SqlClient.SqlBulkCopy> class loads all the data returned by the
<xref:System.Data.IDataReader> object into memory before sending it to SQL Server or SQL Azure.
optimizing memory usage by using the <xref:System.Data.IDataReader> streaming capabilities. Streaming is only applicable to max data types (i.e.
VARBINARY(MAX), VARCHAR(MAX), NVARCHAR(MAX), and XML). When <xref:Microsoft.Data.SqlClient.SqlBulkCopy.EnableStreaming> is set to false,
the <xref:Microsoft.Data.SqlClient.SqlBulkCopy> class loads all the data returned by the <xref:System.Data.IDataReader> object into memory before sending it to the server.
> [!NOTE]
> The main advantage of enabling streaming is reducing memory usage during bulk copy of max data types.
]]></format>
</remarks>
</EnableStreaming>
Expand Down

0 comments on commit 080e9e6

Please sign in to comment.