in

System.Data.SQLite

An open source ADO.NET provider for the SQLite database engine

Corrupted database container on WinCE

Last post 09-18-2008 2:30 PM by Mark2. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 09-16-2008 3:05 AM

    • rene
    • Top 500 Contributor
    • Joined on 09-16-2008
    • Posts 4

    Corrupted database container on WinCE

    Hello, one of the sqlite databases an .net cf application of me uses got heavily corrupted today. It was just a small database for storing config values. I closed the application and 20 minutes later I tried to restart it. But all I got was an exception, which said that the sqlite file is either encrypted or that it isn't a sqlite file. So I looked at the file and it was all blanked out - 2kb of byte 255. Now I wonder how this could have happend and how I can make sure it wont happen again. The application is written in C# whith .Net CF 2.0 with version 1.0.56 of the SQLite provider and Visual Studio 2008. It was running on a Windows Mobile 6 device.
    Filed under: ,
  • 09-16-2008 7:49 AM In reply to

    Re: Corrupted database container on WinCE

    Yuck.  Where was the database located?

  • 09-16-2008 7:57 AM In reply to

    • rene
    • Top 500 Contributor
    • Joined on 09-16-2008
    • Posts 4

    Re: Corrupted database container on WinCE

    It was in a directory under \program files together with the app.
  • 09-16-2008 8:04 AM In reply to

    Re: Corrupted database container on WinCE

    So it was in main memory then ...

    Is this database one that is modified a lot or is it mainly read from?  If written, how often?  Anything written on a timer, or based on something other than user input?

     

  • 09-16-2008 8:20 AM In reply to

    • rene
    • Top 500 Contributor
    • Joined on 09-16-2008
    • Posts 4

    Re: Corrupted database container on WinCE

    It is read once while the start of the application and updates or inserts only happen when the users changes something in the configuration. It is also rather small (~40 records in two tables with three columns each). The other two databases the application uses are read and written far more frequently but they never got destroyed so far.
  • 09-16-2008 8:23 AM In reply to

    Re: Corrupted database container on WinCE

    Well, I'm out of ideas then ...

    Are you using encryption (passwords) on any of these databases?

     

  • 09-16-2008 8:31 AM In reply to

    • rene
    • Top 500 Contributor
    • Joined on 09-16-2008
    • Posts 4

    Re: Corrupted database container on WinCE

    They are not encrypted. It is nothing too bad because it only happend once since we started using it ~9month ago. It's used on about 60 different devices daily now and that was the first problem of that nature. I just thought somebody might have an idea since I could not think of any explanation.
  • 09-18-2008 2:30 PM In reply to

    • Mark2
    • Top 10 Contributor
    • Joined on 04-24-2008
    • Posts 70

    Re: Corrupted database container on WinCE

     We have observed this once when an HP iPAQ overnight completely drained the battery and locked itself up. The reason for the database damage was definitely not the SQLite wrapper and also not CF.NET, because we do not use them on the mobile devices. Maybe the problem is hardware specific or lies in the emergency shutdown routines of Windows Mobile / CE.

Page 1 of 1 (8 items)
Powered by Community Server (Commercial Edition), by Telligent Systems