native exception within try-catch occuring in SQLce

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I have developed an application in VB.net and recently have started to get
native exceptions. When running the application on the device I get an error
that says "A native exception has occured in ....." and it gives me two
buttons - details or quit.

Please note - the error always seems to relate to sqlCE - I think the issue
may somehow be related to SQLCe so I have posted this question in this group.

When viewing details it gives me:

Error
ExceptionCode: 0xc0000005
ExceptionAddress: 0x006c0044
Reading: 0x006c0044

at NativeMethods.OpenStore(IntPtr pOpenInfo, IntPtr pfnOnFlushFailure,
IntPtr& pStoreService, IntPtr& pStoreServer, IntPtr& pQpServices, IntPtr&
pSeStore, IntPtr& pTx, IntPtr& pQpDatabase, IntPtr& pQpSession, IntPtr&
pStoreEvents, IntPtr& pError)
at SqlCeConnection.Open(Boolean silent)
at rmcRemoteConnection.get_LocalConnection()
at rmcRemoteConnection.ExecuteCommand(String SQLStr, SqlCeCommand Command)
at rmcRemoteConnection.ExecuteCommand(SqlCeCommand Command)
at kWGlobal.ExecuteCommand(SqlCeCommand cmd)
at ComponentGlobal.SendDataTokWatch()
at ComponentGlobal.IntervalTime(Object state)
at Timer.ring()

The code within ComponentGlobal.IntervalTime is:

Private Shared Sub IntervalTime(ByVal state As Object)
'THis is fired whenever the time is passed
Dim DatS As datDataSource
Dim BaseTime As New Date(2000, 1, 1)

Try
For Each DatS In DataSources


If (NextIntervalDueDate.Subtract(BaseTime).TotalMilliseconds
Mod DatS.Interval) = 0 Then
'THis means the correct number of intervals has passed
DatS.IntervalTime(Nothing)
End If

Next

'Set the next timeout period
SetNextEvent()

SendDataTokWatch()
Catch ex As Exception
End Try

End Sub

As you can see the entire function is within a try-catch but the error is
not caught. This is a major issue as the reliability of the application is
crucial.

If anyone can help it would be much appreciated.

--
matthew
--
matthew
.


Quantcast