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
New Developer
hobby_johals
Posts: 120
Registered: ‎05-20-2011
My Device: Touch 9800
My Carrier: Vodafone

Importing existing csv sqlite file

[ Edited ]

Hello members

 

I am working in app where the app reqiures to use sqlite.

The app requires an exsisting database.Now the problem is that how to import the existing DB onto SD card.

The DB so far created , how we able to store/import existing csv file (sqlite) on SD card and then fetch the data from it.

 

Thanks

 

Amar
Please use plain text.
Developer
simon_hain
Posts: 15,874
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: Importing existing csv sqlite file

csv means comma separated value, it's not a database but a textfile. you can read it using fileconnection.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
New Developer
hobby_johals
Posts: 120
Registered: ‎05-20-2011
My Device: Touch 9800
My Carrier: Vodafone

Re: Importing existing csv sqlite file

Yes i can read it.

But the problem is app creates  db on SD card and where should i initially place my file to store it onto SD card so that it can be accessible by sqlite.

Amar
Please use plain text.
New Developer
hobby_johals
Posts: 120
Registered: ‎05-20-2011
My Device: Touch 9800
My Carrier: Vodafone

Re: Importing existing csv sqlite file

I wants to import that file and then use it..........

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

Re: Importing existing csv sqlite file

In my experience, an SQLite database that is readable on another platform, can be copied as a file to the SD Card and will be readable on the BlackBerry.

 

Have you tried to do this?

Please use plain text.
New Developer
hobby_johals
Posts: 120
Registered: ‎05-20-2011
My Device: Touch 9800
My Carrier: Vodafone

Re: Importing existing csv sqlite file

Yes i have tried this thing ...The database is readable but my issue is i have an existing database> now i needs to use this DB >for using it have to store this in SD card. Now how can we store it to sd card .As for every user sd card will be different.

Initially we can store the file in resoucers but how to move it to SD card.Any ideas?

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

Re: Importing existing csv sqlite file

[ Edited ]

The SQLiteDemo application does that.  The db is originally stored as a resource but is copied to SD Card.  So look at the demo for help. 

Please use plain text.