Row not found or changed

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
ferroariel
Posts: 8
Joined: Wed 13 Mar 2013 05:48

Row not found or changed

Post by ferroariel » Wed 03 Apr 2013 23:46

I know this is a very common issue on LinqConnect, but I´m going insane.

Check this simple code

Code: Select all

TktSoporteDataContext dc2 = new TktSoporteDataContext();                    
TTiket pepito = dc2.TTikets.FirstOrDefault(a => a.TNUMERO.ToString().Equals(e.CommandArgument.ToString()));
dc2.TTikets.DeleteOnSubmit(pepito);
dc2.SubmitChanges(ConflictMode.ContinueOnConflict);
Always get the very same error: "Row not found or changed"
Row not found or changed.

Descripción: Excepción no controlada al ejecutar la solicitud Web actual. Revise el seguimiento de la pila para obtener más información acerca del error y dónde se originó en el código.

Detalles de la excepción: Devart.Data.Linq.ChangeConflictException: Row not found or changed.

Error de código fuente:


Línea 225: TTiket pepito = dc2.TTikets.FirstOrDefault(a => a.TNUMERO.ToString().Equals(e.CommandArgument.ToString()));
Línea 226: dc2.TTikets.DeleteOnSubmit(pepito);
Línea 227: dc2.SubmitChanges(ConflictMode.ContinueOnConflict);
Línea 228: dc2.Dispose();
Línea 229: dc2 = null;

Archivo de origen: d:\TktSoporte\TktSoporte\TktSoporte\adm\Tickets.aspx.cs Línea: 227

Seguimiento de la pila:


[ChangeConflictException: Row not found or changed.]
Devart.Data.Linq.Engine.b4.a(ConflictMode A_0) +328
Devart.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode) +733
TktSoporte.adm.Tickets.GridView1_OnRowCommand(Object sender, GridViewCommandEventArgs e) in d:\TktSoporte\TktSoporte\TktSoporte\adm\Tickets.aspx.cs:227
System.Web.UI.WebControls.GridView.OnRowCommand(GridViewCommandEventArgs e) +115
System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +68
System.Web.UI.WebControls.GridView.OnBubbleEvent(Object source, EventArgs e) +95
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
System.Web.UI.WebControls.GridViewRow.OnBubbleEvent(Object source, EventArgs e) +121
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +125
System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +169
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +9
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +176
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
I tried everything
- putting each column on UpdateCheck=Never
- using a different datacontext instead of the one being used on page (see "dc2")
No luck at all, I´m very depressed at this time.

WHAT IS HAPPENING ?????

ferroariel
Posts: 8
Joined: Wed 13 Mar 2013 05:48

Re: Row not found or changed

Post by ferroariel » Wed 03 Apr 2013 23:52

To be clear on this,
The code is fired by a row command action from a gridview
I tried this simple code so I guess nobody may argue that "any other person has changed the record..." and that stuff

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Row not found or changed

Post by MariiaI » Thu 04 Apr 2013 11:38

Could you please send us a sample project with which this issue could be reproduced.

JIC: the DbLinqDataSource component can perform deletions automatically, without using the OnRowCommand event. Please try using this functionality and inform us whether DbLinqDataSource deletes rows properly.

Post Reply