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
Contributor
zitvh
Posts: 14
Registered: ‎02-09-2011
My Device: Not Specified

[SOLVED] Can't create sqlite table

[ Edited ]

Hi, I'm having problems creating a sqlite table.

 

try {

var INFONAME = "theTable";

database = openDatabase("H2OMatic", "2.0", "H2OMatic", 1 * 1024 * 1024);
    database.transaction(function (tx) {
        try {
        tx.executeSql('CREATE TABLE IF NOT EXISTS "' + INFONAME + '" (id UNIQUE, infoValue)', [],
            function(tx, response) { alert("Table Created!"); },

            function(error) { alert("SQL Fail: " + error.message); });
        } catch (e) { alert(e.message); }

});

} catch (e) { alert(e.message); }

 

The success and error function don't get called and when ever I try to either query/add/delete/update the table I get a undefined error.

 

Not working on v6.0.0.448.

 

Working fine on v6.0.0.461, v6.0.0.438 (simulator), and v6.0.0.246.

Please use plain text.