On 02/21/2018 05:56 PM, Matthew Dumbleton wrote:
Hi sqlite users,

Can you help me with this problem?
I have switched a long standing project from using whatever version of sqlite 
is on the device to include the aar file generated by the android bindings 
project. However since the change over I get an 'unknown error (code 14): could 
not open database' and from what I can see that is because the database isn't 
getting created when getReadable/WritableDatabase() is called. Is there a 
different call I should be using in this implementation? To clarify the app 
supports api 14+ so I've had to use the 9+ android bindings project to generate 
the aar and all the db connection stuff worked fine before the switch.

If you find the error message in the android log, does the full path to your database file look right? (i.e. a big long path that includes your application name).

Or do you need to create the db directory before opening the db? With something like:

  DB_PATH = getApplicationContext().getDatabasePath("test.db");
  DB_PATH.mkdirs();

Dan.

_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to