BlackBerry SQLite database creation: “filesystem not ready”

Richard is right. You need to check for the existence of the filesystem root “store”. There is an extra wrinkle for using SQLite, though. RIM only supports SQLite on eMMC storage. So even if “store” exists, it will only work if the underlying storage is eMMC. Notably the BlackBerry Bold 9650 device, AKA Bold2, has “store”, but it is not eMMC, so you can’t put an SQLite database there.

I’m not aware of any direct way of finding out whether a filesystem is using eMMC. I asked RIM and was told to check the filesystem size. If it’s over 1 GB, then it is eMMC. That wasn’t a very satisfying answer for me. I ended up checking for the filesystem “system”. It is a read-only filesystem, but it is only present for eMMC storage, and if it exists, you can write a database to the “store” filesystem root.

Via the SQLite developer guide overview:

You can use the SQLite API, provided in the net.rim.device.api.database package, to store application data persistently to eMMC memory or a microSD card.

Leave a Comment