Bde.DBTables.TBatchMove.AbortOnKeyViol
Delphi
property AbortOnKeyViol: Boolean read FAbortOnKeyViol write FAbortOnKeyViol default True;
C++
__property bool AbortOnKeyViol = {read=FAbortOnKeyViol, write=FAbortOnKeyViol, default=1};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | published | Bde.DBTables.pas Bde.DBTables.hpp |
Bde.DBTables | TBatchMove |
Description
Specifies whether the batch operation is terminated immediately when integrity or key violations occur.
Set AbortOnKeyViol to true to cancel the batch operation when it causes integrity or key violations in the destination table. Set AbortOnKeyViol to false to cause records that would cause integrity or key violations to be posted to a key violations table instead. Provide a KeyViolTableName when setting AbortOnKeyViol to false. If there is no KeyViolTableName, AbortOnKeyViol may still be set to false, in which case problem records are counted but not saved in a table.
Key violations occur when appending records to a table that has a primary key. On a table with a primary key, no two records may have the same values on all of the key fields. If a record that is being appended has the same values on all the key fields as a record in the destination table, it cannot be appended.
Integrity violations occur when deleting, appending or updating records to a table that has a referential integrity specification. A referential integrity specification requires that certain fields in one table must have values that exist in a particular field of another table. If a record that is being added does not match the restrictions imposed by referential integrity, it cannot be added. If deleting record would cause tighter referential integrity restrictions that another table cannot meet, it cannot be deleted.