我有一个关于 phonegap 和 sqlite 数据库的问题。我在我的 Assets 文件夹“myDB.db”中预填充了数据库,我的问题是我想直接从 Assets 文件夹访问数据库到 phonegap。我不想复制到 SD 卡或不使用外部数据库。 问候
最佳答案
请试试这个在你的代码中
//Please place your db file in wwww directory ,here example : projectpath/www/santosh.db
db = window.sqlitePlugin.openDatabase({name: "santosh.db", createFromLocation: 1});
如需更多引用,请按照以下链接中的步骤操作...
http://santoshshinde2012.blogspot.in/2015/03/open-existing-sqlite-file-in-phonegap.html
希望对您有所帮助。
关于android - 从 phonegap 中的 Assets 访问 sqlite 数据库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28716102/