01-17-2011 03:33 PM
Occasionally I get emails from app users stating that an error has occured with the app that they downloaded. It looks like the sqlite database is not creating successfully and I have been unable to reproduce the error. The code looks like the following:
db = openDatabase('<database name>', '1.0', '', 10000);
The db object is nothing so an error message is returned to the end user. I have verified that they have a memory card in their phone and have a supported operating system.
Are there any known issues when trying to create a sqlite database in webworks apps? I have tried to replicate the error on my phone by changing multiple settings on the phone, but I have had no luck.
01-17-2011 04:15 PM
Are they connecting their smartphone to via their USB cable and turning on mass storage mode to transfer files to the device?
If so, it will make database access unavailable. You can check the blackberry.system.isMassStorageActive() before accessing the database. I have seen before on some builds of OS 6 that you must close the application and restart it when this happens.
01-18-2011 06:04 AM
Not sure if this is relevant for you.
But I have seen errors when creating Databases if the user is OFFLINE or out of coverage at the time of creation.
It returns a null pointer from the OpenDatabase function.
So a user has to be online to create the initial database.