Solved

Optimistic Concurrency Setting

Posted on 2013-11-25
8
221 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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data 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.
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

724 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