Deleting child table record delete associated parent table record

Using SQL Server 2000.

I have one parent table and a child table. At one time there was a Cascade Delete relationship between the parent's primary key and the child's associated foreign key.

When a child table record was deleted, its associated parent table record was also deleted. This deletion was unwarranted. Hence, I have removed any relationship between the parent primary key and the child foreign key. Yet, when deleting another child table record, the parent table record is still being deleted.

Any suggestions?
mic138Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ram2098Commented:
Can you script these two tables with all the constraints and see still any relation exist....Just to double check you cleared the relations.

0
BillAn1Commented:
Are you sure you don't have that back to front?
A normal cascade delete will delete the child when the parent record is deleted, not the other way round. If you do have a scenario whre the parent record is deleted whenever the child record is delted, then this will be enforced by a custom trigger, not by a cascade delete. Check if you have such a trigger on the child table.
0
muzzy2003Commented:
In Query Analyzer, open the object explorer (F8), expand the database down to the child table and then expand its triggers. Have a look there, you may find there is a trigger that is doing this delete. Right click, Script to new windows as drop, run the script, and it's gone.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mic138Author Commented:
Indeed! There was a trigger set to delete the corresponding parent table record when the child table record was deleted. I will edit the script in Enterprise Manager and remove the deletion (there is other code which I wish to retain). Thank you for your help.
0
muzzy2003Commented:
You're welcome.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.