将数据库设计复制到新数据库 [英] Copy database design to new database

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

问题描述

大家好,



我已经创建了一个小型数据库应用程序,它运行良好。我想创建这个数据库的副本,但我需要所有的表都是空的。我的问题是:有没有办法只将数据库的设计元素(没有表格中的数据)复制到新的?


任何帮助都将不胜感激。

谢谢,

Christina

Hello everyone,

Im quite new to MS Access (i am using MS Access 2003 on Windows XP ) and i have a little question ( i hope).

I have created a small database application and it is up and running nicely.I would like to create a copy of this database but i need all the tables to be empty. My question is: Is there a way to copy only the design elements of a database (without the data in the tables) into a new one?

Any help would be appreciated.
Thanks,
Christina

推荐答案

我认为最安全的方式,确保你拥有完全一样的东西,除了表中的数据将是:
I think the safest way, ensuring you have everything exactly the same except for the data in the tables, would be to :
  1. 制作数据库的文件副本。
  2. 在Access中打开数据库。
  3. 在通用模块中创建快速例程,以处理所有表(CurrentDB.TableDefs)并清空它们(以DELETE FROM [TableName]形式使用SQL)。
  4. Compact&修复数据库。

如果您需要帮助来创建例程,请告诉我。我以前做了几次类似的事情,所以如果你需要它就不应该太难。

Let me know if you need help creating the routine. I''ve done similar things a couple of times before so it shouldn''t be too hard if you need it.


  1. 制作数据库的文件副本。
  2. 在Access中打开数据库。
  3. 在通用模块中创建快速例程处理所有表(CurrentDB.TableDefs)并清空它们(使用表格DELETE FROM [TableName]中的SQL)。
  4. Compact&修复数据库。



为什么要创建新数据库并使用导入功能?担心遗漏什么?

Why just create new db and use Import function? Worried about missing something?


如果你导入对象,那么仍然需要清空表格。

但是,是的,许多物品或属性不是存储在主容器中。

您可以使用精细的牙齿梳理,但是更容易解释并执行我想到的其他方法。
If you import the objects across you then still need to empty the tables.
But yes, a number of items or properties are not stored in the main containers.
You could go through with a fine tooth-comb but it''s easier to explain and execute the other method I thought.


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

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