2

I am using PhoneGap and WebSql. When i am trying it on browser everything is fine.SQLResultSet object has 3 property which are rows,insertId and rowsAffected. But When i generate and Apk and trying a mobile device, SQLResultSet object has two property rows and rowsAffected.It is getting rowsAffected 0 on mobile device however it is getting 1 in browser on pc.On mobile device 'insertID' getting undefined.

  db.transaction(function (t) {
            t.executeSql("INSERT INTO TEST (Testname) VALUES (?)", ["test"], function (t, rresult) {

                alert(JSON.stringify(rresult));

            }, function (t, error) {
                alert(error)
            })

        }, function (error) {

            alert("error" + error);
        },
        function (success) {
            alert("success" + success);
        })

thanks for help.

The table creation is below.

    tx.executeSql("CREATE TABLE IF NOT EXISTS TESTT (Id INTEGER PRIMARY KEY,Testname text)", [],
         function (tx, results) { console.log("Successfully created") },
         function (tx, error) { console.log("Could not created") }
mr.
  • 679
  • 12
  • 30

0 Answers0