.SubmitChanges Exception

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
johnvms
Posts: 2
Joined: Tue 10 Feb 2009 20:20

.SubmitChanges Exception

Post by johnvms » Wed 11 Feb 2009 01:11

Get the following error when .Submitchanges() in the CS SubmitChanges demo. Also get the same error on a small test program I wrote using a different database.

Any ideas?

Thanks

Index was out of range. Must be non-negative and less than the size of the collection.\r\nParameter name: index

at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at System.Collections.Generic.List`1.get_Item(Int32 index)
at Devart.Data.Linq.r.a(MetaType A_0, n A_1, Object A_2, ModifiedMemberInfo[] A_3)
at Devart.Data.Linq.t.a(h A_0, Object A_1, ModifiedMemberInfo[] A_2)
at Devart.Data.Linq.i.a(e A_0)
at Devart.Data.Linq.i.d()
at Devart.Data.Linq.DataContext.SubmitChanges()
at SubmitChanges.MainForm.tsbUpdate_Click(Object sender, EventArgs e) in C:\Program Files\Devart\dotConnect\Linq\Samples\MySQL\CS\SubmitChanges\MainForm.cs:line 31
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at SubmitChanges.Program.Main() in C:\Program Files\Devart\dotConnect\Linq\Samples\MySQL\CS\SubmitChanges\Program.cs:line 15
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Wed 11 Feb 2009 13:30

This problem was already found and fixed. Look forward to the upcoming build.

mobyscore
Posts: 17
Joined: Mon 28 May 2007 11:05

Post by mobyscore » Fri 13 Feb 2009 17:11

I have just upgraded to the latest dotNetConnect for mySQL. Everything was working fine before but now I get a similar error as shown below (failing on Line 232).

Is the fault in "SubmitChanges" to blame?

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.DBConcurrencyException: DB concurrency violation.

Source Error:


Line 230: Set(ByVal value As Integer)
Line 231: AQTUserTable.Logins = value
Line 232: PropertySiteUserSupport.DataContext.SubmitChanges()
Line 233: End Set
Line 234: End Property


Source File: C:\OSS-FTP\OSS-VPN\www\oxscisoft\App_Code\SiteUsers.vb Line: 232

Stack Trace:


[DBConcurrencyException: DB concurrency violation.]
Devart.Data.Linq.t.a(h A_0, Object A_1, ModifiedMemberInfo[] A_2) +692
Devart.Data.Linq.i.a(e A_0) +262
Devart.Data.Linq.DataContext.SubmitChanges() +74
SiteUser.set_LoginCount(Int32 value) in C:\OSS-FTP\OSS-VPN\www\oxscisoft\App_Code\SiteUsers.vb:232
aquator_userlogin.loginAquator_LoggedIn(Object sender, EventArgs e) in C:\OSS-FTP\OSS-VPN\www\oxscisoft\aquator\userlogin.aspx.vb:72
System.Web.UI.WebControls.Login.OnLoggedIn(EventArgs e) +115
System.Web.UI.WebControls.Login.AttemptLogin() +510
System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +124
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +70
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981

broomm
Posts: 3
Joined: Tue 12 Aug 2008 11:26

Post by broomm » Fri 20 Feb 2009 14:18

I too am getting DB concurrency violation exceptions when using .submitchanges (dotConnect Oracle)/

Is this a known problem? Do you have timeframe for fix?

Many Thanks
Mark

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Tue 24 Feb 2009 14:12

Could you please send me (support * devart * com, subject DBConcurrencyException) a small test project illustrating the problem? Please also include the script of the DB objects used in it.

Post Reply