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
Developer
Posts: 79
Registered: ‎09-17-2012
My Device: Torch 9800
My Carrier: DiGi

Cannot Delete Table on Torch 9800

Hi all. I have problem with my web database on Torch 9800(OS 6.0). For some strange reason the DROP statement won't be executed at all.

function byeApp()
{
  emptyTable();
  justByeApp();
}

function createDatabase()
{
  var innerDB = window.openDatabase('mClaimsDB', '1.0', 'mClaimsLocalDB', 5 * 1024 * 1024);
  return innerDB;
}
function justByeApp() { blackberry.app.exit(); } function emptyTable() { var db = createDatabase(); var deleteTable = "DROP TABLE IF EXISTS tblLocalUser"; db.transaction(function(tx) { tx.executeSql(deleteTable); }); }

 When user exit the app, byeApp will be call and then in byeApp() function it will call the emptyTable() function and finally justByeApp() to quit the app. But the table does not get deleted. Have I done something wrong with my coding?

 

Thank you.