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
dtater
Posts: 158
Registered: ‎01-11-2010
My Device: 9700 | 9900 | PlayBook | Dev Alpha
Accepted Solution

questions about openDatabaseSync in a web worker thread

If you want, i can post the code, but my question is a little bit general

 

 

i have a web worker that attempts to open a database

 

db = openDatabaseSync('testDB', '1.0', 'testDBPrettyName',5000);

 

this results in a DB object that is *not null*

 

here's the kicker, though.... the database does *not* show up in the resources section of Ripple

 

How can i verify that this is working correctly?

 

 

 

- - - - - - - - - -
Developer
dtater
Posts: 158
Registered: ‎01-11-2010
My Device: 9700 | 9900 | PlayBook | Dev Alpha

Re: questions about openDatabaseSync in a web worker thread

I think i may have a solution.  sorta.

 

 

After a lot of testing, here's what i've been able to establish.

 

in your main JS thread ie myApp.js you can create a database.

 

then, you can put tables in your database and do anything else you want with the tables.  everything you change will be reflected in ripple.

 

you can use web workers to do anything to an ALREADY CREATED DATABASE.  These changes will be reflected in ripple.

 

basically, use the same database open variables as you did when you intially created the database and you'll be A-OK.

 

TL;DR - WebWorker Threads *do* work with previously created databases; any synchronous change you make to the database (inside a worker thread) will be reflected inside of ripple.  :smileyhappy:

- - - - - - - - - -