SQLite and Android "Database Error:Unable to open the database file"
bobsneidar at iotecdigital.com
Mon Jun 1 11:00:04 EDT 2015
I don’t think it has anything to do with the data in the database, unless the database has been corrupted. If the database is already open by another device, sqLite will not allow you to open it. sqLite is a single user database.
Try opening the database with an sql utility. Fairfax has a great sqLite plugin that I use all the time. I think it can even check the database for inconsistencies.
Also, I would be reticent to use Excel or any office product when running your data through it, simply because they take the liberty sometimes of changing bits of your data to something else. For instance, I could not figure out why I could not get copiers to import data I had exported from another copier, when other techs were having no problem at all. Then I realized I was using a Macintosh. I checked a file that had been opened and saved in OS X Office 2011 by opening it in Livecode as a low level file and checking for anything that was not an ASCII character within certain limits and discovered Office for Mac was converting the copier Line Feeds to Carriage Returns, which the copiers import routines did not recognize. I have also seen Word convert normal quotes to smart quotes.
If you do use office to view your files, ensure that all autocorrect features have been disable *before* you even open the file.
> On May 29, 2015, at 14:20 , Ralph DiMola <rdimola at evergreeninfo.net> wrote:
> I am getting the dreaded and extremely unhelpful "Database Error:Unable to open the database file". This only happens on Android. Works in the IDE on either Mac or PC. Works on iOS. Fails only with some queries. Other queries work just fine. This started after I added some data. If I just add additional criteria to a select query encompassing new data that failed then query will work? Or if the first item in the WHERE clause does not reference any of the new data it works. You can select ALL the data and it works. I'm guessing that there is some data inconsistency that only the Android library cares about. Any ideas how to run this down? Are there any utilities to verify the integrity of an SQLite DB? I load the db from an LC utility that shells to export a .xls to a .txt tab delimited file and then reads in the text file and adds records to the DB.
> Ralph DiMola
> IT Director
> Evergreen Information Services
> rdimola at evergreeninfo.net
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode