Link to home
Start Free TrialLog in
Avatar of Eileen Murphy
Eileen MurphyFlag for United States of America

asked on

ODBC SQL Server -- Delete on Linked table failed

I am confused about what is happening here... I can delete some records from within the table directly -- but there are 2 records I cannot delete via the linked connection. So -- I went into the table directly in the SQL Server -- and am getting a referential integrity error - there are child/related records that need to be deleted.

How do I set that up on the SQL Server? In Access the "child" records got deleted along with the parent records.

Thanks for your help.

Eileen
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

Your SQL Server table is related to another table, and referential integrity is set, so the delete fails.

>In Access the "child" records got deleted along with the parent records.
Check that the delete was successful.  It may also not be the only relationship.
ASKER CERTIFIED SOLUTION
Avatar of ggzfab
ggzfab

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Eileen Murphy

ASKER

Can you please direct me on how to set up "ON DELETE CASCADE Foreign Key Contraint"?
Avatar of ggzfab
ggzfab

This link describes it in detail: CASCADE DELETE
I got it! Thanks for your help!
Thanks a lot!