Solved

Optimistic Concurrency Setting

Posted on 2013-11-25
8
219 Views
Last Modified: 2013-12-17
Where do I change the optimistic concurrency setting to NEVER in SSMS?

Reason for Question:

This weekend I updated to Visual Studio 2013.  I get into my SSMS 2012 and create a simple table for a simple application.  I get the optimistic concurrency control error as I play with data in the table.  Arrrrr.  I read about it and I set a primary key on the table and now I can edit/save etc.  but I get the error message each and every time.  I do some research and people say, turn it off.  Where?  

FYI - This is NOT happening to any previously built tables in SSMS.  Only my new ones after loading VS2013.

Thanks!
0
Comment
Question by:Karen Wilson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 69

Expert Comment

by:Scott Pletcher
ID: 39675236
I don't know what specific error you're referring to:

"the optimistic concurrency control error" ??
0
 

Author Comment

by:Karen Wilson
ID: 39675252
Yes.
0
 
LVL 69

Expert Comment

by:Scott Pletcher
ID: 39675307
That's not an error message.  What is the actual error message?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Karen Wilson
ID: 39675331
Data has changed since the Results pane was last retrieved.  Do you want to save your changes now?  (Optimistic Concurrency Control Error)

Click Yes to commit your changes to database anyway.
Click No to discard your changes and retrieve the current data for this row.
Click Cancel to continue editing.

I click Yes.  Things work fine but it's time consuming.

If I highlight several rows and click Delete - it won't let me, so I delete each row individually, clicking the Yes from the above message.
0
 
LVL 69

Expert Comment

by:Scott Pletcher
ID: 39678612
There's no way around that.  SQL won't try to keep locks when you are "live editing" the table, because you could keep those locks for minutes, hours or days even.  

Instead, to keep from locking virtually everyone else out of the table for the entire time, when you go to save your mods, SQL checks to see if the related row(s) have changed during that time.

You really should learn to use DELETE, INSERT and UPDATE statements to make changes to data.
0
 

Accepted Solution

by:
Karen Wilson earned 0 total points
ID: 39714258
My question was never answered.  I guess you don't!!  

Where do I change the optimistic concurrency setting to NEVER in SSMS?
0
 
LVL 69

Expert Comment

by:Scott Pletcher
ID: 39714452
Exactly, you CAN'T.

I'll repeat the answer more clearly:

This CANNOT be done.

Or, as I put it before:
"
There's no way around that [concurrency issue].  SQL won't try to keep locks when you are "live editing" the table, because you could keep those locks for minutes, hours or days even.  
"
0
 

Author Closing Comment

by:Karen Wilson
ID: 39723474
My question was never answered.
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question