DB2 Version 9.7 for Linux, UNIX, and Windows

DB2BulkCopyOptions Enumeration

Specify options to use with DB2BulkCopy. These options are bit flags, which enable you to combine them in bit masks.

Namespace:
IBM.Data.DB2
Assembly:
IBM.Data.DB2 (in IBM.Data.DB2.dll)

Syntax

[Visual Basic]
<Serializable>
Public Enum DB2BulkCopyOptions
[C#]
[Serializable]
public enum DB2BulkCopyOptions
[C++]
[Serializable]
__value public enum DB2BulkCopyOptions
[JScript]
public
   Serializable
enum DB2BulkCopyOptions

Remarks

You can pass a DB2BulkCopyOptions enumeration into a DB2BulkCopy constructor to define specific behaviors for the WriteToServer methods.

Members

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.

Version information

Last update
This topic was last updated for: IBM® DB2® Version 9.7
.NET Framework version
Supported in: 2.0, 3.0, 3.5 and 4.0
IBM Data Server Client
Supported in: IBM DB2 Version 9.7