System.Data.SqlClient.SqlBulkCopyOptions Enumeration

Bitwise flag that specifies one or more options to use with an instance of System.Data.SqlClient.SqlBulkCopy.

Syntax

[System.Flags]
public enum SqlBulkCopyOptions

Remarks

You can use the System.Data.SqlClient.SqlBulkCopyOptions enumeration when you construct a System.Data.SqlClient.SqlBulkCopy instance to change how the erload:System.Data.SqlClient.SqlBulkCopy.WriteToServer methods for that instance behave.

Members

Member NameDescription
CheckConstraints

Check constraints while data is being inserted. By default, constraints are not checked.

Default

Use the default values for all options.

FireTriggers

When specified, cause the server to fire the insert triggers for the rows being inserted into the database.

KeepIdentity

Preserve source identity values. When not specified, identity values are assigned by the destination.

KeepNulls

Preserve null values in the destination table regardless of the settings for default values. When not specified, null values are replaced by default values where applicable.

TableLock

Obtain a bulk update lock for the duration of the bulk copy operation. When not specified, row locks are used.

UseInternalTransaction

When specified, each batch of the bulk-copy operation will occur within a transaction. If you indicate this option and also provide a System.Data.SqlClient.SqlTransaction object to the constructor, an ArgumentException occurs.

Requirements

Namespace: System.Data.SqlClient
Assembly: System.Data (in System.Data.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0