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
Andrew4Life
Posts: 41
Registered: ‎02-14-2012
My Device: Curve 8900 / Playbook
My Carrier: Rogers

BB10 (Dev Alpha) Web SQL Database Limit

I am trying to port over my Playbook application which is coded in html webworks, the problem is that there seems to be a limitation for the BB10 that wasn't present on the Playbook.

 

The following line of code works on my Playbook App, but it does not work in my BB10 App.

 

    db = openDatabase("databasetest", '1.0', 'Test', 30 * 1024 * 1024); 

(That should translate to about 30MB of storage)

 

My app works okay with the above line of code on the Playbook (though I have heard that some users experienced problems with a white screen). On the otherhand, on my BB10 Dev Alpha, when I try to test it, it gives me a white screen and it doesn't seem like the application is loaded since I can't get the web inspector to show up.

 

If I reduce it to 5MB 

    db = openDatabase("databasetest", '1.0', 'Test', 5 * 1024 * 1024);

The application starts fine, but I then need to store data into the database, which doesn't work, presumable because it runs out of space. The following bit of code is run

 

db.transaction(function(tx){
var branch = null;
var i =0;
  for(i=0;(i<branchOffices.length);i++){
    branch = branchOffices[i];

    tx.executeSql('INSERT INTO branches (column1,column2) VALUES (?, ?)', [ branch.column1, branch.column2 ]  );
  }

});

 but nothing gets stored. 

If I reduce the loop to stop at 1/10th of the data, which is ~3MB, it works fine.

Which shows that it will only allow up to a certain limit (which I presume to be ~5MB)

 

How do I get around this limit?

 

This is so frustrating!

I thought porting from the Playbook was supposed to be easy!

Please use plain text.
BlackBerry Development Advisor (Retired)
robbieDubya
Posts: 418
Registered: ‎07-18-2012
My Device: Q10
My Carrier: Bell Canada

Re: BB10 (Dev Alpha) Web SQL Database Limit

This sounds like a bug.

 

Can you create a (complete but) minimal test app please - that will help for reporting to development.

 

Thank you.

--
Rob is no longer associated with BlackBerry.
Please use plain text.
Contributor
Andrew4Life
Posts: 41
Registered: ‎02-14-2012
My Device: Curve 8900 / Playbook
My Carrier: Rogers

Re: BB10 (Dev Alpha) Web SQL Database Limit

A bug of the PB? Or the BB10?

 

I asked about the webSQL limit during the portathon this weekend and was mentioned that indeed BB10 has a limit (RIM guy quoted 10 MB but he wasn't sure)

 

Please use plain text.
BlackBerry Development Advisor (Retired)
robbieDubya
Posts: 418
Registered: ‎07-18-2012
My Device: Q10
My Carrier: Bell Canada

Re: BB10 (Dev Alpha) Web SQL Database Limit

People I spoke to made it sound like the issue is with BlackBerry 10.

--
Rob is no longer associated with BlackBerry.
Please use plain text.
Contributor
Andrew4Life
Posts: 41
Registered: ‎02-14-2012
My Device: Curve 8900 / Playbook
My Carrier: Rogers

Re: BB10 (Dev Alpha) Web SQL Database Limit

I see.

Well, if it's a bug, hopefully it gets fixed.

I spent all saturday and sunday trying to figure out the problem and in the end I solved it by compressing some data and recoding  my app to work around the limit for now.

 

Would be nice to fix the limit though.

 

You mentioned that I should  create a (complete but) minimal test app? Who would I send that to? 

 

I did already provide the snippets of code that caused the problem, so maybe the dev team can work with that? It shouldn't take more than a few minutes to package the snippet of code. And maybe create a simple loop to fill the database.

 

Please use plain text.
BlackBerry Development Advisor (Retired)
robbieDubya
Posts: 418
Registered: ‎07-18-2012
My Device: Q10
My Carrier: Bell Canada

Re: BB10 (Dev Alpha) Web SQL Database Limit

 Who would I send that to? 

 

We have an issue tracker at https://www.blackberry.com/jira

--
Rob is no longer associated with BlackBerry.
Please use plain text.