In our wpf windows application, we are using sql server ce to store the data while inserting, deleting. For some times, it is working fine but after sometimes, its giving access violation exception. Here is the stack trace for that:
Kindly Suggest? How to resolve this as application is getting closed?
at System.Data.SqlServerCe.NativeMethods.SafeRelease(IntPtr& ppUnknown)
at System.Data.SqlServerCe.SqlCeDataReader.ReleaseNativeInterfaces()
at System.Data.SqlServerCe.SqlCeDataReader.Dispose(Boolean disposing)
at System.Data.SqlServerCe.SqlCeDataReader.Close()
at System.Data.Common.DbDataReader.Dispose(Boolean disposing)
at System.Data.Common.DbDataReader.Dispose()
at System.Data.Common.Internal.Materialization.Shaper1.Finally()
at System.Data.Common.Internal.Materialization.Shaper
1.SimpleEnumerator.Dispose()
开发者_运维技巧 at System.Data.Common.Internal.Materialization.Shaper`1.SimpleEnumerator.MoveNext()
at ParentalHealthServiceBL.DataAccess.HealthMonitorDAO.GetUserCOPDReadings(Int32 userID, String datearameter) in d:\projectParentalHealth\trunk\src\ParentalHealth\ParentalHealthServiceBL\DataAccess\HealthMonitorDAO.cs:line 1355
at ParentalHealthClient.DataAccess.HealthMonitorDAO.GetUserCOPDReadings(Int32 userID, String strFilter) in d:\projectParentalHealth\trunk\src\ParentalHealth\ParentalHealthClient\DataAccess\HealthMonitorDAO.cs:line 46
Thanks!
Are you using SQL CE from different threads? Only version 4 supports concurrent access. If you have not explicitly installed version 4 (Download here) then you are using a version that does not support concurrent access.
精彩评论