dealing with corrupt local database

Topics: Etc...
Mar 13, 2012 at 3:22 PM
Edited Mar 13, 2012 at 3:22 PM


When I am using the local database, it sometimes gets corrupted (almost never, but sometimes).


SQLite error (1): near "s": syntax error 
SQLite error (11): database disk image is malformed. for example.


I would like to do an action (like just delete the existing database and start over with a new one), but i don't know how i should do this.
(use some event or a try catch somewere?)

 thank you.

Mar 13, 2012 at 4:06 PM

well just go to cache location and delete it ;}

Mar 14, 2012 at 10:30 AM
Edited Mar 14, 2012 at 10:32 AM

Thank you for your fast reply.

Isn't there any way I can do it at run-time by writing a try catch or is there an event?
I'll give an example of what i mean:

MainMap.cache.onCacheIsCorrupted += new EventHandler(deleteCache);

void deleteCache(sender, e)
// 'delete' MainMap.cacheLocation 

thank you
Mar 14, 2012 at 2:06 PM

i can add automatic cache rebuild on corruption, but it never happened to me, are you hitting 'stop' while debugging? ;}

Mar 15, 2012 at 10:42 AM

That might have happened once in a while.
But i would really like the certainty that my program can solve this issue on itself.
I know it sounds awful but at the place where our program is going to be used, the computers are not turned off properly and the program might be running. 
I think that's the same (or worse) as to stop debugging? :)


Mar 15, 2012 at 12:44 PM

will be fixed

Mar 19, 2012 at 12:37 PM

Thanks a lot!
No pressure, but when will it be done?

Mar 19, 2012 at 12:43 PM

when the quantum field builds enough motivation particles in my brain ;}

Apr 10, 2012 at 10:45 AM

Hi radioman,

Did you already find time to implement some kind of solution for my problem in one of the new builds, i didn't find any release notes so i'm not sure.

Thx anyway! :) 

Apr 10, 2012 at 11:39 AM

antimatter reactor is loading ;}

May 22, 2012 at 2:19 PM


How is the reactor doing?

Aug 26, 2012 at 10:25 AM

do you still get the error with the new sqlite version?