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
jmace
Posts: 482
Registered: ‎10-24-2008
My Carrier: AT&T

Support for openDatabaseSync() in Web SQL

Can we get support for synchronous transactions in Web SQL storage? The asynchronous abilities work great, but they don't always fit the style of every application.

 

Any future considerations?

_________________________________________
www.jasonmace.com/blackberry
Please use plain text.
Contributor
davidboydca
Posts: 12
Registered: ‎04-19-2010
My Carrier: Vodafone

Re: Support for openDatabaseSync() in Web SQL

I haven't checked yet, but I'm assuming that openDatabaseSync() is supported on Playbook with WebWorkers. 

 

Anyone know for sure?

Please use plain text.
Contributor
davidboydca
Posts: 12
Registered: ‎04-19-2010
My Carrier: Vodafone

Re: Support for openDatabaseSync() in Web SQL

I just checked with the 9.4 simulator. 

 

openDatabaseSync() returns null.

 

Having support for this function on WebWorker threads makes structuring database code so much cleaner. 

 

That's so disappointing.   It works on Chrome 11, why can't you add it for Playbook?

Please use plain text.
Contributor
davidboydca
Posts: 12
Registered: ‎04-19-2010
My Carrier: Vodafone

Re: Support for openDatabaseSync() in Web SQL

Just got confirmation from RIM that openDatabaseSync() won't be available at launch for Playbook.

Please use plain text.
Contributor
totem
Posts: 37
Registered: ‎03-10-2011

Re: Support for openDatabaseSync() in Web SQL

Unfortunately, you have to do async calls, but can get around it by doing nested function calls in the callback parameter.  Not pretty as you mentioned, but you can get it to work.

Please use plain text.