Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.0 » SQL Anywhere Server - Programming » SQL Anywhere Data Access APIs » SQL Anywhere .NET 2.0 API Reference » iAnywhere.Data.SQLAnywhere namespace (.NET 2.0) » SADataAdapter class


UpdateBatchSize property

Gets or sets the number of rows that are processed in each round-trip to the server.

Visual Basic

Public Overrides Property UpdateBatchSize As Integer

public override int UpdateBatchSize  { get; set; }

Setting the value of UpdateBatchSize to 1 causes SADataAdapter.Fill to send its rows as in version 1.0 of the .NET Data Provider: each row in the input set is updated one at a time, in order. The default value is 1.

Setting the value to something greater than 1 causes SADataAdapter.Fill to execute all the insert statements in batches. The deletions and updates are executed sequentially as before, but insertions are executed afterward in batches of size equal to the value of UpdateBatchSize.

Setting the value to 0 causes Fill to send the insert statements in a single batch.

Setting it less than 0 is an error.

If UpdateBatchSize is set to something other than one, and the InsertCommand property is set to something that is not an INSERT statement, then an exception is thrown when calling Fill.

This behavior is different from SqlDataAdapter. It batches all types of commands.

See also