问题
How can i Access a SQLite DB which exists outside the application/database dir?
Looks like openOrCreate
alway point to the appdir/database
回答1:
You can only use getDatabasePath
to get the path for the DB and assuming it is not null copy the file into the given location. The reasoning is that database might not be SQLite so it won't necessarily consist of one file. There is also the issue of filesystem which isn't very portable between platforms.
来源:https://stackoverflow.com/questions/15140469/codenameone-access-sqlite-outside-application-dir-database