Send feedback on this topic.
Teradata.Client.Provider
Guideline for Efficiently Processing Batches
.NET Data Provider for Teradata > Developer's Guide > Working with the Data Provider Features > TdCommandBuilder and TdDataAdapter Overview > Guidelines > Guideline for Efficiently Processing Batches

Setting Up the TdDataAdapter

The following are guidelines that will enable the Data Provider to efficiently process batches:

Verifying Updates

After TdDataAdapter.Update returns, the application will have to check the rows in the DataTable to verify that the corresponding SQL table was updated. The following need to be performed by the application:

  1. Check for Errors

    Check the DataRow.RowError property. If the row was successfully processed this property will be an empty string. When this occurs, verify that the DataRow.RowState property is set to DataRow.Unchanged.

    When the SQL Engine generates an error while processing a row, the DataRow.Error property will contain the error message. The DataRow.RowState will not have been changed. These rows need to be fixed and the TdDataAdapter.Update called again so that the corresponding SQL table can be updated with these rows.

  2. Explicit Transactions Started

    The RowStatus and RowError properties will not show that the rows in the DataTable were rolled back when TdTransaction.Rollback is called to rollback the changes that were applied by TdDataAdapter.Update. For example, if rows in the DataTable were successfully applied to the corresponding SQL table, the RowState will be set to DataRowState.Unchanged. The state will not revert back to the original value when TdTransaction.Rollback is called.

    Refer to Behavior When Batch Processing with Different Settings

Other Items that Affect Batch Processing

The following items can affect the behavior of DataAdapter.Update:

See Also

Working with Batch Size

Continue Processing When Error Occur in Batch

TdTransaction

How Statement Independence Affects Batch Update

Behavior When Batch Processing with Different Settings