我試過在兩種情況下運行該應用程序:安裝了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