Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Regular Contributor
Posts: 79
Registered: ‎09-17-2012
My Device: Torch 9800
My Carrier: DiGi

SQLite Drop Table Help

Hi all. I have this function that will drop a table when user quit the app.

 

function emptyTable()
{
  var db = createDatabase();
  var deleteTable = "DROP TABLE IF EXISTS tblLocalUser";
  db.transaction(function(tx) {
    tx.executeSql(deleteTable, [], goSql, ohSql);
  });
}

function goSql()
{
  alert("dropped");
}

function ohSql()
{
  alert("not dropped");
}

 It works fine on Ripple Emulator. The table is dropped and the goSql callback function is executed. However when I install the app into the device(9900) the table is not dropped and the callback is not executed.

 

Have I done anything wrong with my coding?

 

Any advice will be greatly appreciated. Thank you.

 

 When I tested it on Ripple Emulator the function is working and the callback goSq