Posts Tagged ‘sqlite’

SQLite & Dates

June 17, 2010

I said it before and I’ll say it again, I really like SQLite’s approach to data types. Especially storing dates as strings on the way in, and then using functions for query and comparison on the way out. Anyway that’s it.

Advertisements

Sqlite database crash

May 18, 2010

Recently I set up a SQLite database for an iPhone application using this great little browser.

Reading from the database was fine (using System.Data.Sqlite.Dll is a breeze), but every time I tried to write to the database it was crashing the app. After much debuging & un/commenting of code I finally remembered that the directory of the main application bundle is read-only, and that is where I had the database! Thus on first run after installation, I now copy the blank database to the “Documents” directory and use it from there.

It was a silly mistake but I hope this helps others, because the MonoTouch framework was not throwing an exception, and when the app just crashes on you it’s difficult to determine what’s going wrong.