无法从JavaScript打开sqlite数据库 [英] cannot open sqlite database from JavaScript

查看:478
本文介绍了无法从JavaScript打开sqlite数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



但是当我调用window.openDatabase()方法时,方法下面的消息出现在LogCat上,并且查询返回没有这样的表错误。



物理.db文件是存在的,似乎可以从Java代码,但不能从JavaScript代码
访问。卸载或清除数据并重新安装应用程序对此没有帮助。



我无法解决此错误,请帮助&


phonegap sqlite错误代码= 14
I /数据库(2138):sqlite返回:错误代码= 14,msg =无法在27205行打开文件



解决方案

由JavaScript从Javascript代码创建的数据库,以下主题可能会回答您的问题:



/ p>

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?

这篇关于无法从JavaScript打开sqlite数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆