Javascript Sqlite Update Statement Not Working

maygiettect

New Member
\[code\]var db = openDatabase("CPS", "1.0", "ServicePortal", 200000);db.transaction(function (tx) { tx.executeSql("CREATE Table If Not Exists ServiceReport(CallNumber text PRIMARY KEY, CauseCde text)", [], onSqlSuccess, onSqlError);});\[/code\]Inserting into the table works just fine. But when I try to update a record, I can not get it to run at all.\[code\]function save() { db.transaction(function (tx) { var updateStatement = "Update ServiceReport Set CauseCde = ? Where CallNumber = ?"; tx.executeSql(updateStatement, ["Abuse", callNumber], null, onSqlError); }); }\[/code\]I've tried typing a literal string in place of the callNumber variable as well as removing the WHERE clause all together and just trying to update every record in the table. Nothing.
 
Back
Top