I have a BO mapped to a view that joins fields from 2 tables in a 1-1 relationship. I've created stored procs to handle the inserts and updates and these work ok except for when it comes to concurrency. My BO always returns "success" when saving when there is a concurrency issue on the main table and I'm not sure how to catch this. Here's how my procedure logic is laid out.
UPDATE Table1 SET RowVersion = (RowVersion + 1) ... WHERE PK=@Table1PK AND ((RowVersion = @RowVersion) OR (@RowVersion IS NULL))
SELECT @RowVersion = RowVersion FROM Table1 WHERE PK=@Table1PK;
UPDATE Table2 SET ... WHERE Table1FK=@PK
When there are no concurrency issues, everything works great.
However, if there is a problem during the table updates I do not receive an error.
I think this is more of a SQL Stored Procedure issue than anything having to deal with the framework but either way I'm not sure how to handle this. Any ideas?
TIA