DB2®DataAdapter.UpdateBatchSize Property

Gets or sets the number of commands in a batch to be sent to the database server for execution.

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

Syntax


[Visual Basic]
Public Overrides Property UpdateBatchSize As Integer
[C#]
public override int UpdateBatchSize { get; set; }
[C++]
public:
virtual property int UpdateBatchSize {
   int get () override;
   void set (int value) override;
}
[JScript]
public override function get UpdateBatchSize () : int
public override function set UpdateBatchSize (value : int)

Property value

Gets or sets an integer value that specifies the number of commands that will be processed in each batch of commands sent to the database server.
Value Behavior
0 The entire update is executed in a single batch.
1 Disable batch processing. Each update is sent to the database individually.
> 1 The number of commands to execute as a batch before starting a new batch. If this value is greater than the number of rows, the update will be done as a single batch.

Example

[C#] The following lines of code result in a batch size of 99.

[C#]
    DB2DataAdapter adapter = new DB2DataAdapter();
    adapter.UpdateBatchSize = 99;