WriteToServerAsync(IDataReader, CancellationToken) method
Copies all rows in the supplied System.Data.IDataReader to a destination table specified by the HanaClient.SqlBulkCopy.DestinationTableName property of the HanaClient.SqlBulkCopy object. The cancellation token can be used to request that the operation be abandoned before the command timeout elapses.
Parameters
- reader
- A System.Data.IDataReader whose row are copied to the destination table.
- cancellationToken
- The cancellation instruction. A P:System.Threading.CancellationToken.None value in this parameter makes this method equivalent to HanaBulkCopy.WriteToServerAsync(System.Data.IDataReader).
Returns
A task representing the asynchronous operation.Exceptions
- HanaException class
- Returned in the task object, any error returned by the SAP HANA database server that occurred while copying data.
Remarks
Exceptions are reported via the returned Task object.