Delphi / Object Pascal · Database exception

BDE Error 256 - KEYVIOL

What does BDE Error 256 - KEYVIOL mean in Delphi / Object Pascal?

The classic BDE key-violation error for local Paradox/dBase tables, raised when an insert or edit would create a duplicate value in a field or index that must be unique.

BDE Error 256 - KEYVIOLDelphi (VCL) · Delphi (BDE)

Condition

The classic BDE key-violation error for local Paradox/dBase tables, raised when an insert or edit would create a duplicate value in a field or index that must be unique.

Fix

Check for an existing record with the same key value before inserting, and surface a clear duplicate-key message to the user rather than the raw BDE error; reconsider whether the index really needs to be unique if duplicates are legitimate.

Related database exception