From RAD Studio API Documentation
Jump to: navigation, search


property KeyViolCount: Longint read FKeyViolCount;


__property int KeyViolCount = {read=FKeyViolCount, nodefault};


Type Visibility Source Unit Parent
property public
Bde.DBTables TBatchMove


Reports the number of records which could not be replaced, added, or deleted from Destination because of integrity or key violations.

Use KeyViolCount to learn the number of records form the Source table that could not be applied to the Destination table because of integrity or key violations. To obtain a table of the offending records from the Source table, specify a KeyViolTableName.

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.

Note: If AbortOnKeyViol is true, KeyViolCount will never be greater than one, because the first violation will cause the batch operation to terminate.

See Also