The TdDataAdapter.UpdateBatchSize property is used by an application to control how many SQL-Statements are included in the batch. In other words, how many SQL-Statements will get processed by the TdDataAdapter at one time. For example, suppose UpdateBatchSize property is set 20 and 50 DataRows have been modified. When the TdDataAdapter.Update method is called, SQL-Statements for 20 DataRows will be generated and the TdDataAdapter will send these rows to the Advanced SQL Engine. Then the next 20 rows are processed. This continues until the changes made to all 50 DataRows are reflected in the corresponding SQL table.
UpdateBatchSize is not always the same as the number of SQL-Statements the TdDataAdapter will send in a single Request to the SQL Engine. The TdDataAdapter sends as many statements as possible that will fit into a Request but the number of SQL-Statements will be less than or equal to the UpdateBatchSize value. The TdDataAdapter will continue to package the SQL-Statements into Requests and send them to the SQL Engine until all the SQL-Statements in the batch have been processed. For example, if UpdateBatchSize is set to 100 and TdDataAdapter determines that only 50 SQL-Statements can be included in a Request, two different requests will be sent to the SQL Engine.
The number of SQL-Statements contained in a Request to be sent to the SQL Engine cannot be altered by an application when UpdateBatchSize property exceeds the limits applicable to a Request (e.g. Maximum number of Parameters).
If UpdateBatchSize is set to 0, the Data Provider will group/batch the SQL-Statements into one or more Requests. However specifying 0 will not improve the overall performance and it will use additional memory. Therefore it is recommend to explicitly set the UpdateBatchSize to a value greater than 1. The Request limits mentioned below can be used to estimate an optimal value.
By default UpdateBatchSize property is set to 1. That is Batch Update is disabled.