Question Locked

Database error # 547: The DELETE statement conflicted with the REFERENCE co

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I get the following error message When trying to Delete in a Power Builder Application.

Database error # 547: The DELETE statement conflicted with the REFERENCE constraint

with the Table name and FK name specified.

Any help on this much appreciated

2 replies

by jacque

When you use referential integrity through the use of foreign keys it places constraints on not only that table but every other table that is connected to it through the use of foreign keys. The easiest way to delete a record is to start with the most distant record/table and work backwards to the record in the main record you wish to delete. In other words, to delete a record from the main table or parent table, we need to delete the related record in all of its children?s child tables first; then delete the child?s related record and finally the parent?s record.
Foreign keys and referential integrity can be a pain but they are definitely a necessity. Otherwise, records will become orphaned in your database. I hope this explanation helps. Please contact me if you need any further help.
Jacque Reed (jacquereed@hotmail.com)

This discussion is closed to new replies.