11-02-2010 05:08 PM
I have a JavaScript function named "openDatabase()" that starts with:
11-03-2010 07:24 AM
Hi binnyb,
Gears was only supported on BlackBerry 5.0 devices. On BlackBerry 6 we now support HTML5 objects that replace the Gears functionality.
We have also provided an HTML5 JavaScript toolkit that will allow you to write your code once for HTML5 and it will work both on BlackBerry 5.0 and BlackBerry 6 by simply including the toolkit. It will also be forward compatible with the BlackBerry PlayBook.
Instructions can be found here:
11-03-2010 08:49 AM
Something extra you might want to be aware of....
rename your function openDatabase to something else... it conflicts with the WebSql function that opens a created database. I ran into this issue on my side.
Just include the HTML5_init.js and use the Web SQL syntax for created a DB. It will work on both OS 5 and OS 6 devices.
function openDB() {
var dbSize = 1 * 1024 * 1024; //1MB
var db = openDatabase("testDB","1.0",testDB",dbSize);
if (db) {
db.transaction(function(tx){
tx.executeSql("CREATE TABLE IF NOT EXISTS testTable (Name, PhoneNum)");
});
}
}