vba 将 Access 数据库拆分为前端和后端
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1174608/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Splitting an Access database into a front and back-end
提问by Justin
Okay so I split my access database, and now I have a backend:
好的,所以我拆分了我的访问数据库,现在我有一个后端:
- If I started a brand new table, a brand new query, and a brand form for a different purpose within the db_be.mdb would it appear in the connect "front end" db as I saved it in the backend, or do I have to import it up?
- 如果我在 db_be.mdb 中启动了一个全新的表、一个全新的查询和一个用于不同目的的品牌表单,它会出现在连接“前端”数据库中,因为我将它保存在后端,还是我必须导入吗?
If I do have to import the above, the how do I make the table to stay in the back and just linked to the front end...with "link table"?
如果我必须导入上述内容,我如何使表格留在后面并只链接到前端......使用“链接表”?
at this point if I create an MDE, will there still be a total of three (back end, what is now the front end, and eventually an MDE)??
此时如果我创建一个 MDE,是否仍然总共有三个(后端,现在是前端,最终是一个 MDE)??
thanks guys
谢谢你们
回答by dsteele
Normally, the whole point of a FE/BE database is to have only tables in the BE and everything else in the FE. You would create the table in the BE, then open your FE and link the table. You can use the Link manager (Tools/Database Utilities/Linked Table Manager) or directly (File/Get External Data/Link Tables) Then you would build your forms/queries in the FE.
通常,FE/BE 数据库的重点是在 BE 中只包含表,而在 FE 中包含其他所有内容。您将在 BE 中创建表,然后打开您的 FE 并链接该表。您可以使用链接管理器(工具/数据库实用程序/链接表管理器)或直接使用(文件/获取外部数据/链接表)然后您将在 FE 中构建您的表单/查询。
When you create an MDE it will be a third, separate file, as you mention.
正如您所提到的,当您创建 MDE 时,它将是第三个单独的文件。
回答by JohnFx
To put it succinctly:
简而言之:
- Add any new tables to the back-end database
- Link the tables to the front-end database using "Link table" command (preferrably with a UNC not a mapped table)
- If you make an MDE file, it replaces the front end database. You need to keep the old front end database in case you want to make changes (which requires recreating the MDE).
- Think of the Front-end database as the source code and the MDE as the "Compiled" version.
- 将任何新表添加到后端数据库
- 使用“链接表”命令将表链接到前端数据库(最好使用 UNC 而不是映射表)
- 如果您制作 MDE 文件,它将替换前端数据库。您需要保留旧的前端数据库,以防您要进行更改(这需要重新创建 MDE)。
- 将前端数据库视为源代码,将 MDE 视为“已编译”版本。
回答by KevenDenen
You should only be putting tables in your backend database. Your queries and forms you already created should be in the frontend. You can go to your frontend and import them in so you don't have to recreate them, but then you should go back and delete them from your backend.
您应该只将表放在后端数据库中。您已经创建的查询和表单应该在前端。您可以转到前端并将它们导入,这样您就不必重新创建它们,但是您应该返回并从后端删除它们。
When you split your database, did you link go to the frontend and link the tables from the backend? If you didn't, you need to do that. If you used the built-in Database Splitter from the Tools menu, this is already done. Otherwise, you need to go to your frontend and link to the tables in the backend. You can do this by opening your frontend and right clicking in the tables area and choosing Link Tables. This is only for tables though, you can't link to your queries/forms/etc.
当您拆分数据库时,您是否链接到前端并从后端链接表?如果你没有,你需要这样做。如果您使用了工具菜单中的内置数据库拆分器,这已经完成了。否则,您需要转到前端并链接到后端的表。您可以通过打开前端并右键单击表格区域并选择链接表格来完成此操作。这仅适用于表,您无法链接到您的查询/表单/等。
Hmph...slow typing and answering while distracted at work...dsteele's answer is right on as well.
哼……在工作中分心时打字和回答很慢……dsteele 的回答也很正确。