使用JayData为Android访问SQLite数据库/电话峡 [英] Access Sqlite database using JayData for Android/Phone Gap

查看:145
本文介绍了使用JayData为Android访问SQLite数据库/电话峡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用SQLite数据库Android应用程序。现在我想创建一个使用手机峡相同的应用程序。我需要使用 Jaydata 来连接到同一个SQLite数据库。我已经通过文件走了,但找不到在哪里放置数据库文件,以便它可以从我的应用程序访问。

I have an android application that uses a SqLite database. Now i want to create the same application using Phone Gap. I need to use Jaydata to connect to the same Sqlite Database. I have gone through the documentation but could not find out where to place the database file so that it can be accessed from my application.

推荐答案

您不必数据库放置到特定文件夹,JayData会为您创建它(这是支持的方法)。在线程更多信息 - 查询在JayData
您可以添加识别应用程序的第一次启动并插入必要的记录给你一个数据库初始化机制 - 从一个文件例如:

You don't have to place the database to a specific folder, JayData will create it for you (this is the supported method). More info in the thread - Query in JayData You can add a init mechanism that recognizes the first start of the app and inserts the necessary records to you DB - for example from a file.

这篇关于使用JayData为Android访问SQLite数据库/电话峡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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