简体   繁体   English

Codenameone:在应用程序目录/数据库外部访问sqlite

[英]Codenameone: access sqlite outside application dir/database

How can i Access a SQLite DB which exists outside the application/database dir? 如何访问应用程序/数据库目录之外的SQLite数据库?

Looks like openOrCreate alway point to the appdir/database 貌似openOrCreate送花儿给人指向APPDIR /数据库

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. 您只能使用getDatabasePath来获取数据库的路径,并假设它不是null,则将文件复制到给定位置。 The reasoning is that database might not be SQLite so it won't necessarily consist of one file. 原因是数据库可能不是SQLite,因此它不一定包含一个文件。 There is also the issue of filesystem which isn't very portable between platforms. 还有文件系统的问题,它们在平台之间不是很容易移植。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM