如何打开通过HTTP远程SQLite数据库?数据库、HTTP、SQLite

2023-09-09 21:50:51 作者:Memory倒叙

是否有可能打开over HTTP的sqlite的文件?我只需要读取数据库,并希望我可以做这样的事情:

Is it possible to open an sqlite file over http? I only need to read the db, and was hoping I could do something like:

var dbFile:File = new File("http://10.1.1.50/project/db.sqlite");
sqlConnection.open(dbFile);

错误#3125:无法打开数据库文件',细节:连接已关闭,操作:开放,detailID:1001

我的形势要求编制的各种设备来共享此文件几个应用程序,它通过瓦帕供应本地。

My situation calls for several apps compiled for various devices to share this file, which is served locally via wamp.

推荐答案

邮编您的SQLite文件从 db.sqlite 为 db.zip 。加载使用URLLoader和将它解压缩回弹性在这个zip文件柔性。

Zip your sqlite file from db.sqlite to db.zip. Load this zip file in flex using URLLoader and unzip it back in flex.

如果没有,你还可以重命名文件的扩展名.XML,加载它使用的HTTPService或URLLoader和一旦你得到的结果,你可以重命名文件的名称回.sqlite并开始查询文件,它会工作得罚款。

If not, you can also rename the file's extension to .xml, load it using httpservice or urlloader and once you get the result, you can rename the file's name back to .sqlite and start querying the file and it will work just fine.