It happens on the actual hardware.

I can't get it to crash right after the program starts running, it only does it after the device is turned off and then turned back on while the program is still running, so I don't think the debugger will keep running if I turn off the device. I'm storing the database on the storage card, would that be a problem? I'm not at work today, so I'll try moving it to memory on friday.

I've got another pocket pc, but I have to order a charger for it, guess this is the right motivation to finally get that done .

As a temp solution, I'm going to dump the data into a text file and then write another quick program that will take the data and stick it in the database.

This is very frustrating, it doesn't seem to have a problem reading from the database right after it's turned on, it only crashes on INSERT lines.

Just to experiment a bit more, I wrote a small program that just inserts the time and date as a string into a test table in the same database when a button is pressed. I get the same problem, instant crash. I then created a whole new database and tried the same test program, still crashes. All of these databases were on the storage card. It wasn't until I started typing this that I thought about moving the database to memory.