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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Highlighted
Contributor
Posts: 32
Registered: ‎12-10-2010
My Device: Not Specified

How to bundle a database file with the app

Hi, 

 

i'm writting a webworks app. I want to distribute the app with a local database (will bed attach in the app bundle). I want to a access this database in my webworks extension. Which URI to file should i use? Is it file:///store/home or local:///something?

 

Thanks

Retired
Posts: 34
Registered: ‎10-24-2011
My Device: Curve
My Carrier: Telus

Re: How to bundle a database file with the app

You can include file with in the .cod and handle it with local protocol.

See this link for more info.



1.Please resolve your thread by clicking the "Accept as Solution" button below the post which solved your problem!
2. If any post helps you please click the button below the post(s)
Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: How to bundle a database file with the app

But you cannot do this with a SQLite database file.. any SQLite database file needs to be created via JavaScript. You cannot attach to a specified file

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Developer
Posts: 185
Registered: ‎08-17-2008
My Device: Red BlackBerry Z10
My Carrier: Vodafone

Re: How to bundle a database file with the app

[ Edited ]

You can attach a file with json format with the database elements or a simple vairable string with json format.

 

On first run, create the database and insert elements from this json file or variable string.

 

All the best

Josep Maria