PhoneGap android database not working -
I'm having trouble doing database examples with PhoneGrap I
The problem is, when I Open the database and populate to open it, then I get a warning of success, but when I try to select one I get an error:
"In SQL processing Error: 0 " Is there a problem with the database and the Android phone which is not me You know what? I have also tried an Android emulator and I am raising the same issue.
Can you help me?
Here is the JavaScript code:
Now I have the following code:
document.addEventListener ("deviceready", onDeviceReady, incorrect ); Function PopularDB (Tx) {tx.executeSql ('Demo present in the drop table'); Tx.executeSql ('Create tables when not present in the display (ID unique, data)'); Tx.executeSQL ('INSERT DEMO (ID, data) value (1, "first line")); Tx.executeSQL ('Insert In Dots (ID, Data) Value (2, "Second Line")); } Function error cc (mistake) {warning (error in "SQL processing:" + err.code); } Festival Success (CB) (Warning ("Success!"); } Function curidib (tx) {tx.executeSql ('SELECT * FROM DEMO', [], querySyT, error cc); } Function querySuccess (tx, result) {warning ("i am here");); } Function querySuccess (tx, result) {// it will be empty because no row was entered. Console.log ("Insert ID =" + results.insertId); // This will be 0 because it is a statement console. Log ("Affected by Rows =" + results.rowAffected); // Choose the number of rows returned by console.log ("insert id =" + results.rows.length); Click on (function () {warning ('click'); var db = window.openDatabase ("test", "1.0", "test db", 1000000); db.transaction (populateDB, errorCB, success cb) ; Db.transaction (queryDB, errorCB);})}); } And whenever I make a populated transaction, but there is a secure alert, but there is an error processing the SQL in queryDB warning: 0.
Thanks in advance,
Elka
PS: I am also using jQuery Mobile
Check that the PhoneGrap is ready:
document.addEventListener (" deviceready ", onDeviceReady, false);
Comments
Post a Comment