Can not open the sqlite database from JavaScript

advertisements

I'm trying to read sqlite database from the JS side which is created/updated by Android Activity or Service.

But when I call window.openDatabase() method the message below is appear on the LogCat, and Query returns 'no such table' error.

physical .db file is there and seems to accessible from within the Java code, but cannot access from the JavaScript code. Uninstall or Clear data and reinstall the app did no help with this.

I have no clue to solve this error please help & any suggestions are very appreciated.

phonegap sqlite error code=14 I/Database(2138): sqlite returned: error code = 14, msg = cannot open file at line 27205


If you are trying to access the database created by Activity from the Javascript code, the following thread might answer your question:

How do I call window.openDatabase from a webView hosted in an android application?