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

Native Development

Posts: 26
Registered: ‎11-10-2013
My Device: Z10
My Carrier: Dialog
Accepted Solution

How to make an sql database for an app

How do I make a database for an app. Can I create it outside somewhere in my computer and then copy it into the assets folder? or is there any standard way?

Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: How to make an sql database for an app

Yes you can make it externally if you wish, two programs I have used are SQLite Browser and sqlitestudio both do the job but sqlitestudio has more functionality and is the one I now use exclusively.


There are many others however, just search for sqlite application in google.

If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Posts: 1,177
Registered: ‎03-20-2013
My Device: Red LE Developer Z10
My Carrier: Fido

Re: How to make an sql database for an app

Be aware that any database you access from your assets folder is read-only unless you copy it to your app's data directory and open it from there. You cannot write anything to your assets path at runtime in a signed app (it works during development due to relaxed permissions but you are in for a nasty surprise when you deploy it.)


If your database stucture is relatively simple you can just create a zero length file in you data path, open it as a database, and then use DDL commands to define the structure.

Developer of Built for BlackBerry certified multiFEED RSS/Atom feed reader and aggregator.  multiFEED Icon

Play nice: Clicking Like Button on posts that helped you not only encourages others to continue sharing their experience, but also improves your own rating on this board. Also, don't forget to accept a post if it solves your problem or answers your question.