"Key Violation" indicates corruption in the database.
Every record has a unique ID field that is generated sequentially whenever you add a new record.
If the master record for this gets reset for example by deleting the IdGenerator table this is exactly the error you will get.
The solution is to delete all the files in the database folder and let the program recreate a new empty database.
Or else restore your database from a backup copy.