Using Phonegap For Android : Not Able To Create Table In The Database
BackGround : I am new to PhoneGap and trying to create a simple table in the SQLite using HTML5 + PhoneGap on Android. Here is my HTML Code. (Using the reference code from PhoneGap
Solution 1:
I could be off base, but it appears that window.openDatabase
is actually an HTML 5 feature of the browser. It looks like your code:
var db = window.openDatabase("Database", "1.0", "PhoneGap Demo", 200000);
Is returning null
.
From your Android 2.3 emulator, launch the device's web browser and go to http://html5test.com/
, and see if web SQL database shows as supported.
Solution 2:
I got the solution and i am posting it here.
Actually, the DB is getting created and is under '/data/data/package_name/' folder. I was searching it under '/data/data//databases' folder and that is the reason I was not able to see the table getting created.
Creating SQLite Table from Android HTML Assets
is good link and has helped a lot.
Post a Comment for "Using Phonegap For Android : Not Able To Create Table In The Database"