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

Posts: 676
Registered: ‎05-06-2012
My Device: Dev Alpha & PlayBook
My Carrier: wifi

Database in a WebWorks App?

I want to build an app that uses an editable database using web technology.


Is this possible, if so how can it be done?

co-founder of Diaree | BB Dev for PictureThis
Posts: 26
Registered: ‎06-01-2010
My Device: Dev Alpha, PlayBook

Re: Database in a WebWorks App?

Yes, depending on requirements there are a few ways you can implement this. One option is to use Web SQL, which is supported on Blackberry 6.0 +, PlayBook, and BB10. It is deprecated by the W3C, but it is still a valid option if you want to support a large range of devices. If you are only targeting BB10 + devices, then you could use the more modern equivalent called IndexedDB.


There is a great example at http://www.html5rocks.com/en/tutorials/webdatabase/todo/ that you can hopefully use as a starter project.



My latest Blackberry 10 app Audiobooks! Smiley Happy

My latest PlayBook app Photojam!

Find me on Twitter: GoGibbons
Posts: 322
Registered: ‎08-06-2012
My Device: Dev Alpha / Playbook / Curve 9300

Re: Database in a WebWorks App?

Also check out the BB documentation, if you haven't already.  Like the section on storage here:



Lots of sample code AND it will tell you which devices your DB will work on.  Be warned not all storage types work across all devices.  My favourite is localstorage but you will also need to assess if you have security concerns.

If it helped you, click like. Smiley Happy