To get as much information as possible from a SqlCe error, traverse the SqlCe error collection to get each SqlCeError, see this sample (for managed code
Unfortunately, the exception occurs outside my code. I cannot place a try/catch around it.
I'm just looking for diagnostics to track down the error. For example, with Linq I can turn on some debug info with:
Code Snippet
MyDataContext db = new MyDataContext (@."mydb.sdf");
db.Log = System.Console.Out;
db.Connection.StateChange+=new StateChangeEventHandler(Connection_StateChange);
Can more be done?
|||
Not much more can be done, unless you add more tracing to your code to determine the state of the app when the crash happens.
|||Maybe you are encountering on of the rare SL CE bugs, like to the one reported here: http://www.pluralsight.com/blogs/jimw/archive/2007/09/04/48361.aspx|||Yep, it's a random AccessViolationException that kills the entire app.
|||The problem may be related to multi-threading, which would explain the randomness.
I've changed the code to guarantee a unique db connection per thread and things *seem* to work...for now.
No comments:
Post a Comment