Click here to Skip to main content
15,917,541 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

In ASP.NET (framework 3.5) Visual studio 2010, I'm using the TableAdapter Configuration Wizard to create/configure a TableAdapter for a very simple SQL Table.
I make sure the Advanced Option "Use Optimistic Concurrency" is checked. (The Generate Insert, Update, and Delete Statements box is checked too.) The wizard seems to complete just fine, but the generated statements don't look like they're taking advantage of optimistic concurrency.
When I re-run the TableAdapter Configuration wizard to look at the "Use Optimistic Concurrency" checkbox, it is NOT checked, even though I definitely checked it the previous time I ran the wizard.
Any idea's why "Use Optimistic Concurrency" checkbox getting unchecked after configuration of TableAdapter?

Thanks,
Posted
Comments
Kornfeld Eliyahu Peter 13-Jan-15 7:56am    
Does your where clause in update statement contains only the key fields or all the fields are there?
R@jd33p 16-Jan-15 1:41am    
Both statements, Update and Delete containing all fields with WHERE clause. Please refer below
=>> DELETE FROM Tablename
WHERE (Keyfiled = @Original_Keyfiled) AND (Column1 = @Original_Column1) AND (Column2 = @Original_Column2)
=>> UPDATE TableName
SET Column1 = @Column1,Column2 = @Column2
WHERE (Keyfiled = @Original_Keyfiled) AND (Column1 = @Original_Column1) AND (Column2 = @Original_Column2)
Kornfeld Eliyahu Peter 16-Jan-15 1:42am    
So optimistic concurrency IS in use!
R@jd33p 16-Jan-15 1:45am    
Yes. it's IN use but not getting any result.
I followed below link as reference:
http://www.c-sharpcorner.com/uploadfile/john_charles/implementing-optimistic-concurrency-control-in-Asp-Net-2-0/
Kornfeld Eliyahu Peter 16-Jan-15 1:56am    
I didn't got you! What do you mean by 'not getting any result'?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900