Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - Linq To Sql using store proc is calling update instead of delete

Reply
 
Old 04-25-2009   #1 (permalink)
Kalman Skulski


 
 

Linq To Sql using store proc is calling update instead of delete

I have a schema that has a parent child relationship. I have decided to
implelment operations using stored procs for the child table(view). I wrote
my custom insert update and delete and then mapped them to my view using the
configure behavior dialog.

At first I got an "An attempt was made to remove a relationship between a
Parent and a Child. ... OwnerParentId) cannot be set to null" when I
attempted to delete a child record. After a bit of research I changed my
schema association and added a DeleteOnNull. This made no change. I still
got the error. I then made by child FK field nullable. It won't ever be
null but OK.
This made the error disapear. Instead it just doesn't work.

I check the dbcontext log and found instead of calling my delete stored proc
it was calling my update stored proc.

I did try a manual delete by calling DeleteOnSubmit but when I delete it
using the UI (winform grid) it calls update instead of delete.

Any Ideas?


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
[LINQ TO SQL] Probleme for update a child element .NET General
Disable Media Center Store Update Manager? Vista General
LinQ. update column with auto generated value .NET General
Update to WMUtil to remove blank files from the message store Vista mail


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46