• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1195
  • Last Modified:

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
0
Eileen Murphy
Asked:
Eileen Murphy
  • 3
  • 2
1 Solution
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
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.
0
 
ggzfabCommented:
In MS SQL we can use the ON DELETE CASCADE Foreign Key Contraint
0
 
Eileen MurphyIndependent Application DeveloperAuthor Commented:
Can you please direct me on how to set up "ON DELETE CASCADE Foreign Key Contraint"?
0
Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

 
ggzfabCommented:
This link describes it in detail: CASCADE DELETE
0
 
Eileen MurphyIndependent Application DeveloperAuthor Commented:
I got it! Thanks for your help!
0
 
Eileen MurphyIndependent Application DeveloperAuthor Commented:
Thanks a lot!
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now