Solved

Optimistic Concurrency Setting

Posted on 2013-11-25
8
214 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
  • 4
  • 4
8 Comments
 
LVL 69

Expert Comment

by:ScottPletcher
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:ScottPletcher
ID: 39675307
That's not an error message.  What is the actual error message?
0
 

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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 69

Expert Comment

by:ScottPletcher
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:ScottPletcher
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now