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

Java Development

Reply
Developer
skicson
Posts: 56
Registered: ‎07-14-2008
My Device: Not Specified
Accepted Solution

Bundle a database?

I'd l ike to bundle a sqlite database with my app.  I've seen where I can open a database from an SD card.  Is it possible to open it from the set of files bundled with the app?

Please use plain text.
Developer
peter_strange
Posts: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: Bundle a database?

According to the API,

"Note: A SD card is the preferred storage for databases, currently Storm and Bold are the devices that can create databases with internal memory"

By internal memory I presume they mean the //Store location.

 

You could do what the OS 5.0 demo does and copy a database from a file shipped in the cod onto the SD Card and process from there. 

Please use plain text.
Developer
skicson
Posts: 56
Registered: ‎07-14-2008
My Device: Not Specified

Re: Bundle a database?

Thanks Peter - I missed that before when I looked at that demo.

 

It's a shame that database use is still limited to SD Card or "certain devices".  I read on another thread that not all Storm's and/or Bolds have the right kind of internal memory.  I guess I'll end up using a persistent store again...[sigh]

 

Anyways, thanks again.

Please use plain text.
New Developer
sibbaldl
Posts: 41
Registered: ‎06-22-2010
My Device: N/A
My Carrier: N/A

Re: Bundle a database?

Hi skicson

 

By "persistent memory" I presume you are referring to a flat file using file.io methods, yes?

 

I'm in a situation where I'm targeting Device 5.0 smartphones only for my widget, and was going to use the SQL Lite approach until I read about the limitations of the memory. Now I'm not sure what to do. I certainly don't want a mongrel approach where SQL Lite is used for some devices and a flat file for others, leading me to conclude that a flat file is the way to go. But then I'm concerned about security (I'll be storing passwords), meaning I have to figure out how to encrypt or otherwise protect the file contents. Also is it guaranteed (space providing) that storing a flat file internally will always work (i.e. none of this "certain devices" business)?

 

Suddenly it's not as easy as it first looked. :smileysad:

 

Did you end up using a flat file? Did you need to emply any form of file/content protection? Any advice on this would be appreciated

 

Cheers!

 

Lee

=============================
Win 7 (32bit)
Eclipse Galileo
BlackBerry Web Plug-in
Version: 2.0.0.201003191451-33
BlackBerry Widget SDK
Version: 1.0.0.201003191451-126
=============================
Please use plain text.