Hi, I have a question related to error handling.
Look at the following:
Error Code : 1216
Cannot add or update a child row: a foreign key
constraint fails
Error Code : 1217
Cannot delete or update a parent row: a foreign key
constraint fails
I have a parent table which has more than one child
table. When I catch the error in the programming
language, I would like to know
which table is giving the error because I want to
display the Message Box with the corresponding
message to the user, something like: "Cannot delete
customer because invoices exists."
Is there something in MySQL that can be able to tell
me this?
If thereīs nothing to correct this, do you have an
idea to resolve this with something else?
Thanks for the time!
Roland