替换数据库文件 [英] Replacing database file

查看:123
本文介绍了替换数据库文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在VB.net和MS-Access数据库中开发并分发了软件,
现在,我已经在数据库中进行了更改,因此我想创建一个实用程序来替换
现有数据库文件并创建了新文件,以便我可以将该Update实用程序分发给客户端.最简单的方法是什么?请分享您的想法.

Hi, I have developed and distributed software in VB.net and MS-Access database,
Now I have made changes in database so I want to create an utility which will replace
the existing database file with new created, so that I can distribute that Update utility to client. What is easiest way to do it? please share your ideas.

推荐答案

如果您希望客户丢失数据库中的所有数据,您要做的就是将新的空白数据库文件复制到旧的.

如果要保留数据,则必须选择,但Access都不是很好.您可以编写一个迁移实用程序来移动旧数据库,将新的空白数据库文件复制到位,然后逐个复制每个表的记录.

另一个选择是制作旧数据库的备份副本,然后运行SQL语句修改现有数据库中的表.当然,您必须编写每个SQL语句才能自己进行修改.
If you want the customer to lose all their data in the database, all you have to do is copy the new blank database file over the old one.

If you want to retain the data, you have to options, neither is very nice in Access. You can write a migration utility to move the old database, copy the new, blank, database file in place, then copy the records over for each table, one by one.

The other option is to make a backup copy of the old database, then run the SQL statements to modify the tables in the existing database. You, of course, have to write each SQL statement to do the modifications yourself.


这篇关于替换数据库文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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