在添加数据时发生了未处理的异常。

28 浏览
0 Comments

在添加数据时发生了未处理的异常。

我之前发布了一个问题,但我没有足够的知识来回答。我对此还很新,所以如果问题不正确,请原谅。

  1. 在本地笔记本电脑上创建了一个带有Access数据库的Windows窗体应用程序。它运行正常。我可以添加、删除、修改和搜索数据。
  2. 我将应用程序qvb.exe和数据库转移到了测试服务器上的一个文件夹中。
  3. 如果我打开应用程序,我可以添加、删除、修改和搜索数据。没有问题。
  4. 如果同事打开应用程序,他无法添加、删除、修改和搜索数据。他会收到一个未处理的异常错误。请参见附加的图片和错误描述。
  5. 奇怪的是,如果将可执行文件和Access数据库从服务器复制到同事的笔记本电脑上,数据库可以正常工作。

问题:为什么测试服务器上会发生未处理的异常?

(同事和我自己都是该服务器的本地管理员)

System.Data.OleDb.OleDbException (0x80004005): 操作必须使用可更新的查询。

在 QVB.qvblogDataSetTableAdapters.TableAdapterManager.UpdateAll(qvblogDataSet dataSet) 中

在 QVB.qvb.qvblogBindingNavigatorSaveItem_Click(Object sender, EventArgs e) 中

在 System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e) 中

在 System.Windows.Forms.ToolStripButton.OnClick(EventArgs e) 中

在 System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e) 中

在 System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e) 中

在 System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met) 中

在 System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met) 中

在 System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea) 中

在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) 中

在 System.Windows.Forms.Control.WndProc(Message& m) 中

在 System.Windows.Forms.ScrollableControl.WndProc(Message& m) 中

在 System.Windows.Forms.ToolStrip.WndProc(Message& m) 中

在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) 中

在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) 中

在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) 中

查看图片描述

************** 已加载的程序集 **************

mscorlib

程序集版本: 4.0.0.0

Win32 版本: 4.8.4180.0 built by: NET48REL1LAST_B

代码库: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll

QVB

程序集版本: 1.0.0.0

Win32 版本: 1.0.0.0

代码库: file:///D:/QVB3/QVB.exe

System.Windows.Forms

程序集版本: 4.0.0.0

Win32 版本: 4.8.4150.0 built by: NET48REL1LAST_C

代码库: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

System

程序集版本: 4.0.0.0

Win32 版本: 4.8.4001.0 built by: NET48REL1LAST_C

代码库: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

System.Drawing

程序集版本: 4.0.0.0

Win32 版本: 4.8.3761.0 built by: NET48REL1

代码库: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

System.Configuration

程序集版本: 4.0.0.0

Win32 版本: 4.8.4190.0 built by: NET48REL1LAST_B

代码库: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

System.Core

程序集版本: 4.0.0.0

Win32 版本: 4.8.4180.0 built by: NET48REL1LAST_B

代码库: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

System.Xml

程序集版本: 4.0.0.0

Win32 版本: 4.8.3761.0 built by: NET48REL1

代码库: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

System.Data

程序集版本: 4.0.0.0

Win32 版本: 4.8.4190.0 built by: NET48REL1LAST_B

代码库: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll

System.Data.DataSetExtensions

程序集版本: 4.0.0.0

Win32 版本: 4.8.3761.0 built by: NET48REL1

代码库: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Data.DataSetExtensions/v4.0_4.0.0.0__b77a5c561934e089/System.Data.DataSetExtensions.dll

System.Numerics

程序集版本: 4.0.0.0

Win32 版本: 4.8.3761.0 built by: NET48REL1

代码库: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll

Accessibility

程序集版本: 4.0.0.0

Win32 版本: 4.8.3761.0 built by: NET48REL1

代码库: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll

System.Transactions

程序集版本: 4.0.0.0

Win32 版本: 4.8.3761.0 built by: NET48REL1

代码库: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll

System.EnterpriseServices

程序集版本: 4.0.0.0

Win32 版本: 4.8.3761.0 built by: NET48REL1

代码库: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.EnterpriseServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll

************** JIT 调试 **************

要启用即时 (JIT) 调试,请将该应用程序或计算机(machine.config)的 .config 文件中的 jitDebugging 值设置为 system.windows.forms 部分。

该应用程序还必须编译时启用调试。

例如:

启用 JIT 调试后,任何未处理的异常

将发送到计算机上注册的 JIT 调试器

而不是由此对话框处理。

如果您需要更多内容,请告诉我!

谢谢。Ron

0