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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Highlighted
New Contributor
Posts: 2
Registered: ‎05-27-2013
My Device: z10
My Carrier: t-mobile

HTML5 Database (without SD Card)

[ Edited ]

Hi guys,

 

i recently buy a z10 devices to make some test with my working app and im stuck in html database storage ... 

 

z10 cames without external sd card memory api database paper:

 

https://developer.blackberry.com/html5/apis/database.html

 

the only way to use "window.openDatabse" is with sd card ... its a joke or im doing something wrong ... 

 

here my code, when i try to execute the following code and "SECURITY_ERR: DOM Exception 18" ...

 

var
  db,
  database_name = "foo",
  database_version = "1.0",
  database_displayname = "Foo DB",
  database_size = "2 * 1024 * 1024"; // 2mb

// helpers

function openDatabase(callback) {
  var delegate = function () {
    (callback || successCB)(db);
  };
  if (typeof db === "undefined") { // single open
    try{
      db = window.openDatabase(database_name, database_version, database_displayname, database_size);
    } catch(e) {
      alert('Error: ' + e);
    }
    db.transaction(function (transaction) {
      transaction.executeSql('CREATE TABLE IF NOT EXISTS persistence (key TEXT PRIMARY KEY, value TEXT)');
    }, errorCB, delegate);
  } else {
    delegate();
  }
}

 

im using phonegap / cordova (2.7) and the code was executed after "deviceready" ...

 

thks !

 

 

 

Retired
Posts: 71
Registered: ‎09-19-2012
My Device: No sleep til BlackBerry 10
My Carrier: Bell

Re: HTML5 Database (without SD Card)

The documentation seems to imply that only 5.x devices require an SD Card for HTML5 Database.  Have you since been able to resolve this issue?

------------------------------
@grahamzibar
-_- zZZ
New Contributor
Posts: 2
Registered: ‎05-27-2013
My Device: z10
My Carrier: t-mobile

Re: HTML5 Database (without SD Card)

noup, I could not... i use localstorage ... ugly but its persist fine ...

Retired
Posts: 71
Registered: ‎09-19-2012
My Device: No sleep til BlackBerry 10
My Carrier: Bell

Re: HTML5 Database (without SD Card)

Fair enough! Lacks data relationships though Smiley Sad

Did you ever try IndexedDB? Just curious Smiley Happy
------------------------------
@grahamzibar
-_- zZZ