Updating records using view and stored procedures
Posted: Fri 02 Oct 2009 10:59
Hi
This may be a trivial Linq question ...
I am using views and stored procedures.
If I update 10 rows in my UI and use SubmitChanges, the Update SP is called for each row, which is fine.
Problem is, the SP might throw an exception for one of the rows due to logic in the procedure. I can easily catch the exception but how do I know which one of the 10 rows that failed ?
ChangeConflicts is empty. ChangeSet.Updates contains all 10 rows.
So I am stuck.
Do we have to provide logic in the SP to return the failed rows primary key ?
Best regards
Glenn
This may be a trivial Linq question ...
I am using views and stored procedures.
If I update 10 rows in my UI and use SubmitChanges, the Update SP is called for each row, which is fine.
Problem is, the SP might throw an exception for one of the rows due to logic in the procedure. I can easily catch the exception but how do I know which one of the 10 rows that failed ?
ChangeConflicts is empty. ChangeSet.Updates contains all 10 rows.
So I am stuck.
Do we have to provide logic in the SP to return the failed rows primary key ?
Best regards
Glenn