Follow via:
RSS
Email Alert
Question
0 Votes
+ -

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

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
4th Jan 2007

Answers (1)

0 Votes
+ -
The DELETE statement conflicted with the REFERENCE
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)
Updated - 4th Mar 2008
Answer the question
Formatting +
BB Codes - Note: HTML is not supported in forums
  • [b] Bold [/b]
  • [i] Italic [/i]
  • [u] Underline [/u]
  • [s] Strikethrough [/s]
  • [q] "Quote" [/q]
  • [ol][*] 1. Ordered List [/ol]
  • [ul][*] · Unordered List [/ul]
  • [pre] Preformat [/pre]
  • [quote] "Blockquote" [/quote]

Join the TechRepublic Community and join the conversation! Signing-up is free and quick, Do it now, we want to hear your opinion.