I'm getting the "Row not found or changed" error in a very small snippet of code that seems very direct without any gotchas (and yet, I'm getting gotcha'd)
I know that this error is typically found when there is a concurrency error ... but all I'm trying to do is flip a boolean field. I don't have any other code behind the scenes change any other fields in tmp, nor any code in my Watch list that modifies tmp.
What on earth am I missing here?
This table has 2 DateTime fields (CreatedAt, UpdatedAt), and I set both to "Never" for concurrency checks, but I still get the problem ... (there have been many posts on concurrency issues with the DateTime field format due to precision errors).
So, after a lot of trial and error ... I disabled concurrency checks on *all* fields, then added them back one at a time. Turns out the culprit was a string field that was nullable in the DB but not set as nullable in the designer. I'm not sure "System.Data.Linq.ChangeConflictException:
Row not found or changed." is the most informative error given what the problem was ... but there ya go.
Yea I had the same issue, annoyingly bad error message that cost me about 2 hours.
I really feel that MS exceptions lack enough detail, black boxes like LINQ are all very well and good as long as the developer has access to plenty of stateful relevant information.
Having said that things are getting better, the compiler error messages such as "Are you missing a reference to System.Linq" show that at least MS are getting this now.
I have a simular problem which is not resolved. It is the same erronious error, but only occurs when using the update() method. I have identified the effect occuring anytime that the data is changed outside of the application. This of course is without the
application running so it should be oblivious to any changes. Yet...Any other information surrounding this issue would be most appreciated. I'm using VS2010 and MSSQL 2008.
Orion2480
Member
66 Points
73 Posts
LINQ - Row not found or changed (yet it is a simple/direct attempt to save)
Mar 11, 2008 04:54 PM|LINK
I'm getting the "Row not found or changed" error in a very small snippet of code that seems very direct without any gotchas (and yet, I'm getting gotcha'd)
I know that this error is typically found when there is a concurrency error ... but all I'm trying to do is flip a boolean field. I don't have any other code behind the scenes change any other fields in tmp, nor any code in my Watch list that modifies tmp. What on earth am I missing here?
Orion2480
Member
66 Points
73 Posts
Re: LINQ - Row not found or changed (yet it is a simple/direct attempt to save)
Mar 11, 2008 07:06 PM|LINK
This table has 2 DateTime fields (CreatedAt, UpdatedAt), and I set both to "Never" for concurrency checks, but I still get the problem ... (there have been many posts on concurrency issues with the DateTime field format due to precision errors).
Orion2480
Member
66 Points
73 Posts
Re: LINQ - Row not found or changed (yet it is a simple/direct attempt to save)
Mar 11, 2008 07:24 PM|LINK
tomdeloford
Member
8 Points
8 Posts
Re: LINQ - Row not found or changed (yet it is a simple/direct attempt to save)
Mar 31, 2009 12:43 PM|LINK
Yea I had the same issue, annoyingly bad error message that cost me about 2 hours.
I really feel that MS exceptions lack enough detail, black boxes like LINQ are all very well and good as long as the developer has access to plenty of stateful relevant information.
Having said that things are getting better, the compiler error messages such as "Are you missing a reference to System.Linq" show that at least MS are getting this now.
rachel1.0
Member
22 Points
8 Posts
Re: LINQ - Row not found or changed (yet it is a simple/direct attempt to save)
Nov 11, 2009 12:47 PM|LINK
I just had this exact same issue, thanks a lot for this post. It saved me a lot of time.
EB
Member
8 Points
4 Posts
Re: LINQ - Row not found or changed (yet it is a simple/direct attempt to save)
Dec 14, 2009 05:15 PM|LINK
Yes, I was getting the very same error and that was the cause. Thanks for the help!
http://kcwebprogrammers.blogspot.com
axtun
Member
2 Points
1 Post
Re: LINQ - Row not found or changed (yet it is a simple/direct attempt to save)
Jan 04, 2010 02:06 AM|LINK
Ditto here. Thanks a lot.
PaulSpencer
Participant
1091 Points
209 Posts
Re: LINQ - Row not found or changed (yet it is a simple/direct attempt to save)
Mar 26, 2010 08:18 AM|LINK
Me Too, Many Thanks!
if an answer, mark it so.
DRCTECH
Member
4 Points
2 Posts
Re: LINQ - Row not found or changed (yet it is a simple/direct attempt to save)
May 17, 2010 05:58 AM|LINK
I have a simular problem which is not resolved. It is the same erronious error, but only occurs when using the update() method. I have identified the effect occuring anytime that the data is changed outside of the application. This of course is without the application running so it should be oblivious to any changes. Yet...Any other information surrounding this issue would be most appreciated. I'm using VS2010 and MSSQL 2008.
reza.h78
Member
420 Points
98 Posts
Re: LINQ - Row not found or changed (yet it is a simple/direct attempt to save)
May 26, 2010 12:36 PM|LINK
Hi DRCTECH
I had this problem once and in my case the "StoreOriginalValuesInViewState" property was set to "false" in my Linq datasource.
When I changed it to "true" it was working fine. You can try this.
Please let me know if this solved your problem or not.