RAD Studio
ContentsIndex
PreviousUpNext
Handling Batch Move Errors

There are two types of errors that can occur in a batch move operation: data type conversion errors and integrity violations. TBatchMove has a number of properties that report on and control error handling. 

The AbortOnProblem property specifies whether to abort the operation when a data type conversion error occurs. If AbortOnProblem is True, the batch move operation is canceled when an error occurs. If False, the operation continues. You can examine the table you specify in the ProblemTableName to determine which records caused problems. 

The AbortOnKeyViol property indicates whether to abort the operation when a Paradox key violation occurs. 

The ProblemCount property indicates the number of records that could not be handled in the destination table without a loss of data. If AbortOnProblem is True, this number is one, since the operation is aborted when an error occurs. 

The following properties enable a batch move component to create additional tables that document the batch move operation:

  • ChangedTableName, if specified, creates a local Paradox table containing all records in the destination table that changed as a result of an update or delete operation.
  • KeyViolTableName, if specified, creates a local Paradox table containing all records from the source table that caused a key violation when working with a Paradox table. If AbortOnKeyViol is True, this table will contain at most one entry since the operation is aborted on the first problem encountered.
  • ProblemTableName, if specified, creates a local Paradox table containing all records that could not be posted in the destination table due to data type conversion errors. For example, the table could contain records from the source table whose data had to be trimmed to fit in the destination table. If AbortOnProblem is True, there is at most one record in this table since the operation is aborted on the first problem encountered.
Note: If ProblemTableName is not specified, the data in the record is trimmed and placed in the destination table.

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!