Question

Locked

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

By spurthi.guna ·
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

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

The DELETE statement conflicted with the REFERENCE

by jacque In reply to Database error # 547: The ...

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)

Back to Software Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums