read/write sqlite db using sd card

15 views
Skip to first unread message

howud...@gmail.com

unread,
Feb 15, 2017, 10:12:37 AM2/15/17
to CodenameOne Discussions
My program allows users to store their db in any writeable portiion of the sd card (or external sd card).  or if they are on iOS or dont have any saved DBs, it uses getAppHomePath()
However Database.openOrCreate(sDB) appears to be dependant on <apppath>/database for example when I provide a full path to the db I get this error: path to '/home/peter/.cn1/database/file://home//Peter Carlson.db3': '/home/peter/.cn1/database/file:' does not exist
How can I read/write to a DB that is on the SD Card?

Shai Almog

unread,
Feb 16, 2017, 12:08:57 AM2/16/17
to CodenameOne Discussions, howud...@gmail.com
You can't.
You can get the path where we actually do store the database and copy the file to/from there but you can't determine the path where SQLite will work.
Reply all
Reply to author
Forward
0 new messages