?
Solved

Optimistic Concurrency Setting

Posted on 2013-11-25
8
Medium Priority
?
223 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
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…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Suggested Courses

765 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