TdsBulkLoadResult Class

Represents the outcome of a bulk load.

public sealed class TdsBulkLoadResult

Properties

NameDescription
ErrorGets the error to return to the client, or null when the rows were accepted.

Gets the error to return to the client, or null when the rows were accepted.

public TdsQueryError? Error { get; }

Property value

TdsQueryError?

Methods

NameDescription
FromError(TdsQueryError)Creates a result that rejects the rows: SqlBulkCopy.WriteToServer throws a SqlException with the error.
Success()Creates a result that accepts the rows. The server reports their count to the client.

FromError(TdsQueryError)

TdsBulkLoadResult.cs

Creates a result that rejects the rows: SqlBulkCopy.WriteToServer throws a SqlException with the error.

public static TdsBulkLoadResult FromError(TdsQueryError error)

Parameters

error TdsQueryError

Returns

TdsBulkLoadResult

Creates a result that accepts the rows. The server reports their count to the client.

public static TdsBulkLoadResult Success()