1

I am having phonegap android app where i create database using

openDatabase(shortName, version, displayName,maxSize);

for example my database name test and a table test_table

Now i want to access test_table data using DatabaseHelper of Android(not in phonegap part but in same application)

i have tried using

query(DATABASE_TABLE, new String[] { row_1, row_2 }, null, null, null, null, null);

but showing no table exist. after creating table and inserting data i try to access using simple android code.

my question is can i able access database what i created using phonegap? if possible then how?

Saifuddin Sarker
  • 853
  • 3
  • 8
  • 26
  • You may found it intresting: http://stackoverflow.com/questions/9109438/how-to-use-an-existing-database-with-an-android-application/9109728#9109728 – Yaqub Ahmad Jan 10 '13 at 08:49
  • I don't know if it's possible, but I don't know why you need to access to the html5 database in java code. JS can do everything for accessing database, you can refer to this: https://cordova.codeplex.com/wikipage?title=How%20to%20use%20nova.data – Leo Cai Jan 10 '13 at 08:49
  • @YaqubAhmad thanks for your reference that code seems first copy phonegap database then work on it. but my database wiil change i mean new data will be added and updated so what will happen in that case. – Saifuddin Sarker Jan 10 '13 at 09:01
  • Hey @SaifuddinSarker did you find any solution for this? I have same issue. Please let me know if you get any solution for this. Thanks – Manish Kumar Feb 25 '14 at 11:14
  • Sorry Still not. According to some expert says its kind of not possible.The way they are suggesting its kind of copy the database which is not a good way :). – Saifuddin Sarker Feb 27 '14 at 15:49

0 Answers0