我试过在两种情况下运行该应用程序:安装了SQL Server精简版(3.5)并且没有安装。如果没有安装SQL Server Compact Edition中,我得到以下错误:试图读取或写入受保护的内存-Sql Compact和.NEt
Exception :Attempted to read or write protected memory. This is often an indication
that other memory is corrupt.
Inner Exception :
========================
Stack Trace :
========================
at System.Data.SqlServerCe.NativeMethods.CloseStore(IntPtr pSeStore)
at System.Data.SqlServerCe.SqlCeConnection.ReleaseNativeInterfaces()
at System.Data.SqlServerCe.SqlCeConnection.Dispose(Boolean disposing)
at System.Data.SqlServerCe.SqlCeConnection.Finalize()
Source :
========================
System.Data.SqlServerCe
----------------------------------------------------------
我使用this method处理未处理的异常。
我从我从Windows窗体开始的控制台应用程序中收到此错误。在这两个应用程序中,我插入了未处理的异常编码,并且它正在执行并返回到文本文件,并且Microsoft的“报告错误”对话框正在生成;我如何避免这种情况发生?如何解决导致此问题的原因?
你做了哪些代码更改以使其工作?我想我的问题在于Visual Studio 2010是打开DB的“其他应用程序”。 – JasonD 2010-08-27 03:50:02
我可以知道downvote的原因 – Jankhana 2012-03-12 10:57:15
-1只是因为这不是一个答案。我很高兴你解决了你的问题,但总的来说,这个答案并没有告诉任何人。 – 2013-05-17 12:54:24