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
babakar
Posts: 704
Registered: ‎05-29-2012
My Device: see later
My Carrier: see later

SQLLite

IN SQLLIte, I have my database coming with my application.How can I read it? its in the same level as java classes under source pakage

 

String DB_NAME = "/jaww";     
             String dbLocation = "";      
             URI uri = URI.create(dbLocation + DB_NAME);
             _db = DatabaseFactory.open(uri);

 

 

this gives me error.any helps?

Please use plain text.
Contributor
OscarQ
Posts: 18
Registered: ‎03-02-2012
My Device: BlackBerry 9300
My Carrier: Yoigo

Re: SQLLite

Have you tried to remove "/" of the name?

Please use plain text.
Developer
babakar
Posts: 704
Registered: ‎05-29-2012
My Device: see later
My Carrier: see later

Re: SQLLite

yes
Please use plain text.
Developer
carlostheone
Posts: 151
Registered: ‎01-20-2010
My Device: Blackberry Bold
My Carrier: Telefonica

Re: SQLLite

In not sure, but you have to copy your DB to SDcard , then you can use it.

I

Sorry for my english.

Please use plain text.
New Developer
Sultan14
Posts: 47
Registered: ‎05-11-2012
My Device: Blackberry Bold 9930
My Carrier: Tmobile

Re: SQLLite

Hi,

this link is really usful! You can go through all the steps and understand how the sqllite work.

 

http://docs.blackberry.com/en/developers/deliverables/8682/Create_a_SQLite_database_761831_11.jsp

 

if you are looking just to retrieve some tables from a data base, check this out 

 

http://docs.blackberry.com/en/developers/deliverables/8682/CS_retrieving_table_data_660691_11.jsp

 

I hope that can help. 

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

Re: SQLLite

The SQLiteDemo that comes with your tooling demonstrates how to copy a SQL database that has been included in your resources to the SD Card.  It must be on the SD Card to be used, it can not be used directly from the resources. 

Please use plain text.