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.
Asked
Active
Viewed 930 times
1 Answers
0
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.
-
Thanks Robesz , Does that mean that i have to create the database all over again with all the tables in jaydata? – Sourav301 Jul 04 '13 at 08:16
-
No, not at all, only at the first time. The database stays there and will be available during the following app starts. – Robesz Jul 04 '13 at 08:31
-
Ok i got it , but is there any way i can use my existing database? My database is pretty big one and i dont want to create it again. – Sourav301 Jul 04 '13 at 14:36
-
I would have shared it, but unfortunately there isn't a supported way. The recommended way is to export your data to a file and instert the data from the file unsing JayData during the first start of the app. – Robesz Jul 05 '13 at 09:43