升级黑莓数据库(upgrade blackberry database)

编程入门 行业动态 更新时间:2024-10-23 18:35:01
升级黑莓数据库(upgrade blackberry database)

在我的应用程序中,我有一个写入sdcard的数据库。 我们不得不对数据库进行很多重大更改,因此当用户升级应用程序时,有没有办法删除并重新安装数据库,但只能在升级时使用?

In my application, I have a database that gets written out to the sdcard. We have had to make a lot of big changes to the database, so when the user upgrades the application, is there a way to delete and reinstall the database, but only on upgrade?

最满意答案

执行此操作的最佳方法是在升级中使用一大块代码检查旧数据库,如果找到旧数据库,则执行升级。

这可以让你控制发生的事情,以及它是如何发生的。

The best way to do this is to have a chunk of code in the upgrade that checks for the old database and if it finds an old database, do the upgrade.

This lets you control what happens, and also how it happens.

更多推荐

本文发布于:2023-08-05 20:30:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1438037.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:数据库   黑莓   upgrade   blackberry   database

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!