开源改变世界!!

向 Material 表添加新记录时出错 #1042

推推 grbl 1年前 (2023-01-28) 120次浏览
关闭
frankvdh 打开了这个问题 2020 年 6 月 7 日 · 1条评论
关闭

向 Material 表添加新记录时出错#1042

frankvdh 打开了这个问题 2020 年 6 月 7 日 · 1条评论

注释

向 Material 表添加新记录时出错 #1042

从数据库底部删除了几行永远不会适用于我的行,然后单击空白的“模型”字段添加一条新记录并收到此错误消息:

LaserGrbl v3.5.0.0
Grbl v1.1h
包装器:UsbSerial
Win 10,专业版,10.0.18363.0 (7)

TypeOf异常【System.Data.DeletedRowInaccessibleException】
异常信息【删除行信息无法通过行访问。】
异常来源【System.Data】,线程【Main Thread】
异常方法【Int32 GetDefaultRecord()】

———- 堆栈跟踪 ————
在 System.Data.DataRow.GetDefaultRecord()
在 System.Data.DataRow.get_Item(DataColumn 列)
在 LaserGRBL.PSHelper .MaterialDB.MaterialsRow.get_Model() 在 E:\LaserGRBL\LaserGRBL\PSHelper\MaterialDB.Designer.cs: 第 721
行在 E:\LaserGRBL\LaserGRBL\PSHelper\ MaterialDB.cs:
System.Data.DataView.AddNew()
在 System.Data.DataView.System.ComponentModel.IBindingList.AddNew()
在 System.Windows.Forms.BindingSource.AddNew()
在 System.Windows.Forms的第 37 行.CurrencyManager.AddNew()
在 System.Windows.Forms.DataGridView.DataGridViewDataConnection.AddNew()
在System.Windows.Forms.DataGridView.DataGridViewDataConnection.OnNewRowNeeded
(
) (Int32 columnIndex, Int32 rowIndex, Boolean setAnchorCellAddress, Boolean validateCurrentCell, Boolean throughMouseClick)
在 System.Windows.Forms.DataGridView.OnCellMouseDown (HitTestInfo hti, Boolean isShiftDown, Boolean isControlDown)
在 System.Windows.Forms.DataGridView.OnCellMouseArDown(DataGridViewCellMouse)E
在 System.Windows.Forms.DataGridView.OnMouseDown(MouseEventArgs e)
在 System.Windows.Forms.Control.WmMouseDown(消息& m,MouseButtons 按钮,Int32 点击)
在 System.Windows.Forms.Control.WndProc(消息& m)
在 System.Windows.Forms.DataGridView.WndProc(消息& m)
在系统.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

向 Material 表添加新记录时出错 #1042
所有者

感谢您的错误报告。数据库功能是实验性的,我还需要做一些改进。

我建议删除“可见”标志而不是删除记录,否则这些删除的记录可能会在以后的 LaserGRBL 更新中重新出现。