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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Web and WebWorks Development

Reply
BlackBerry Development Advisor
oros
Posts: 839
Registered: ‎04-12-2010
My Carrier: Bell

Re: Can't make Database API work on simulator

Hello samvayn,

 

Unfortunately you can not specify a location for where the database will be stored. The overall path will be similar in both cases, but if flash memory is available it will be stored there; otherwise on the SD Card.

 

In my case, I used the 9780 simulator running 6.0.0.534. Once the simulator started, I configured the SD Card through the Simulate > Change SD Card... menu. This created my database on the PC's SD Card at the following root folder and should do the same in your environment.

...\sd\BlackBerry\system\appdata\rim\webstorage

 

It seems though that this is a persistent issue. While testing on a simulator, it seems you will either need to run clean.bat or manually delete the database from the SD Card folder.

 

I was also hoping you could try with the sample HTML posted on this message as it was tested before with success in a similar scenario:

http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/OS5-OS6-Ripple-and-Chrome-Databa...

 

Erik Oros

BlackBerry Development Advisor

 

Please note that I will be unavailable between May 19th and June 4th. Sincere apologies for any delays during this time. I will do my best to follow-up as soon as I am able.

Erik Oros
BlackBerry Development Advisor
@WaterlooErik
Please use plain text.
Developer
songdawg
Posts: 59
Registered: ‎06-08-2011
My Carrier: n/a

Re: Can't make Database API work on simulator

Hi oros,

 

Does this also apply to devices?

 

"Unfortunately you can not specify a location for where the database will be stored. The overall path will be similar in both cases, but if flash memory is available it will be stored there; otherwise on the SD Card."

 

I can't locate the .db file on a 9780 device and would like to completely remove the database since it seems to stay even after the webworks application is uninstalled (BES). When I install the next version of the application (which has a different database schema) it errors out because the older database wiht previous schema seems to still exist.

 

Thanks!

Please use plain text.
BlackBerry Development Advisor
oros
Posts: 839
Registered: ‎04-12-2010
My Carrier: Bell

Re: Can't make Database API work on simulator

Hi there,

 

This is true for both devices and simulators in that a WebWorks database is created in a default folder and can't be assigned to a specific location. Depending on the supported storage options, the database can reside directly on the device:

/Device/BlackBerry/system/appdata/rim/webstorage/

 

Or on the SD Card:

/Media Card/BlackBerry/system/appdata/rim/webstorage/

 

On your device, if you check both of these locations, you should find a sub-folder named after your application, which contains the releavant db file.

 

Erik Oros

BlackBerry Development Advisor

Please note that I will be unavailable between May 19th and June 4th. Sincere apologies for any delays during this time. I will do my best to follow-up as soon as I am able.

Erik Oros
BlackBerry Development Advisor
@WaterlooErik
Please use plain text.
Contributor
samvayn
Posts: 13
Registered: ‎02-09-2012
My Carrier: none

Re: Can't make Database API work on simulator

I am now testing on a physical Curve 9330 with updated OS 6.  I can't figure out where the database is located - I am looking using Files and it is not in any of the places indicated by oros. Any help on this?

 

Thanks,

 

Sam

Please use plain text.
BlackBerry Development Advisor
oros
Posts: 839
Registered: ‎04-12-2010
My Carrier: Bell

Re: Can't make Database API work on simulator

Hi Sam,

 

Sorry for the delay here, been out of the office. I'll track down a 9330 and will give it a go to see if I can find the DB. Mind just sharing the full OS6 build version that you are using? This really shouldn't affect the outcome, but might as well use the same one here.

 

Erik Oros

BlackBerry Development Advisor

Please note that I will be unavailable between May 19th and June 4th. Sincere apologies for any delays during this time. I will do my best to follow-up as soon as I am able.

Erik Oros
BlackBerry Development Advisor
@WaterlooErik
Please use plain text.
Contributor
samvayn
Posts: 13
Registered: ‎02-09-2012
My Carrier: none

Re: Can't make Database API work on simulator

I am sorry - I did figure it out - System folder is hidden and I did not see it unless I revealed it.

It is stored on a SD card.

Please use plain text.
BlackBerry Development Advisor
oros
Posts: 839
Registered: ‎04-12-2010
My Carrier: Bell

Re: Can't make Database API work on simulator

Right on. Glad to hear you got it figured out.

 

Erik Oros

BlackBerry Development Advisor

Please note that I will be unavailable between May 19th and June 4th. Sincere apologies for any delays during this time. I will do my best to follow-up as soon as I am able.

Erik Oros
BlackBerry Development Advisor
@WaterlooErik
Please use plain text.