我可以嵌入在AIR应用程序SQLite数据库? [英] Can I embed a sqlite database in an Air application?

查看:140
本文介绍了我可以嵌入在AIR应用程序SQLite数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

时,它总是需要在Adobe AIR应用程序为用户创建一个数据库,或者你可以运送一个空数据库作为分布式应用程序的一部分?

Is it always necessary to create a database for the user in an adobe air application or can you ship an empty database as part of the distributed app?

推荐答案

中查找部分的Flex 3.0文档分发一个pre填充的数据库。从文档:

Look up the section 'Distributing a pre-populated database' in Flex 3.0 documentation. From the documentation:

[...]作为替代以编程方式创建数据库,结构和数据,你可以用你的应用程序分发pre填充的数据库。要分发predefined数据库,包括在应用程序的AIR包中的数据库文件。

[...]As an alternative to creating the database, structure, and data programmatically, you can distribute a pre-populated database with your application. To distribute a predefined database, include the database file in the application's AIR package.

像包含在AIR包中的所有文件,一个捆绑的数据库文件安装在应用程序目录(File.applicationDirectory属性psented目录重新$ P $)。然而,在该目录下的文件是只读的。使用从AIR包中的文件作为一个模板的数据库。一个用户运行应用程序的第一次,复制原始数据库文件到用户的应用程序存储目录(或其他位置),和在应用中使用该数据库。

Like all files that are included in an AIR package, a bundled database file is installed in the application directory (the directory represented by the File.applicationDirectory property). However, files in that directory are read-only. Use the file from the AIR package as a "template" database. The first time a user runs the application, copy the original database file into the user's application storage directory (or another location), and use that database within the application.

所以,回答你的问题:

你能运送一个空数据库作为分布式应用程序的一部分?

can you ship an empty database as part of the distributed app?

是肯定的!

这篇关于我可以嵌入在AIR应用程序SQLite数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆