SqlBulkCopy::WriteToServerAsync Method (DbDataReader^, CancellationToken)

.NET Framework (current version)
 

The asynchronous version of WriteToServer, which copies all rows from the supplied DbDataReader array to a destination table specified by the DestinationTableName property of the SqlBulkCopy object.

Namespace:   System.Data.SqlClient
Assembly:  System.Data (in System.Data.dll)

public:
Task^ WriteToServerAsync(
	DbDataReader^ reader,
	CancellationToken cancellationToken
)

Parameters

reader
Type: System.Data.Common::DbDataReader^

A DbDataReader whose rows will be copied to the destination table.

cancellationToken
Type: System.Threading::CancellationToken

The cancellation instruction. A None value in this parameter makes this method equivalent to WriteToServerAsync.

Return Value

Type: System.Threading.Tasks::Task^

Returns Task.

.NET Framework
Available since 4.6
Return to top
Show: