我可以在Air应用程序中嵌入sqlite数据库吗?

前端之家收集整理的这篇文章主要介绍了我可以在Air应用程序中嵌入sqlite数据库吗?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
是否总是需要在adobe air应用程序中为用户创建数据库,还是可以将空数据库作为分布式应用程序的一部分发送?

解决方法

在Flex 3.0文档中查找“分发预先填充的数据库”部分.从文档:

[…]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.

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?

是是的!

猜你在找的Sqlite相关文章