Specify options to use with DB2BulkCopy. These options are bit flags, which enable you to combine them in bit masks.
[Visual Basic]
<Serializable>
Public Enum DB2BulkCopyOptions
[C#]
[Serializable]
public enum DB2BulkCopyOptions
[C++]
[Serializable]
__value public enum DB2BulkCopyOptions
[JScript]
public
Serializable
enum DB2BulkCopyOptions
You can pass a DB2BulkCopyOptions enumeration into a DB2®BulkCopy constructor to define specific behaviors for the WriteToServer methods.
Member name | Bit value | Description |
---|---|---|
Default | 0 | Uses the default values for all options. |
KeepIdentity | 1 | Preserves source identity values. Identity
columns can be kept only if they are not defined as GENERATED ALWAYS.
If they are defined as GENERATED ALWAYS, the WriteToServer method
throws an exception. When not specified, identity values are assigned by the destination. |
TableLock | 2 | Assigns a table lock for the duration of
the bulk copy operation. Other applications are not permitted to update
the table during the copy operation. When not specified, table reads are allowed on the table for rows that existed before the copy operation. |
Truncate | 4 | Clears the data in the destination table before the copy operation starts. |