自动构建 Access 2007 数据库

发布于 2024-12-20 19:00:52 字数 992 浏览 2 评论 0原文

作为构建过程的一部分,我们必须创建一个 Access ACCDB (2007) 数据库。数据库构成了我们应用程序的当前前端,并且必须(由于其他原因)在构建过程的初始阶段进行构建。

目前,这是一个手动过程,我希望能够实现自动化。我们的数据库由许多表、公式、查询等组成。我相信我们实际上已经接近 Access 实际能够处理的极限,因此我们尽量不再向其中添加任何内容。

我看过这个项目: http://buildmsaccessdb.codeplex.com/

它似乎工作得很好。然而,在我们的项目中,我们还有一个 ACD 文件,它是一个二进制文件,其中包含许多系统相关的表。在 Access 开发方面,我绝不是一个高手。我刚刚接手了处理构建过程的任务。

每当我使用上述项目包含 ACD 文件时,我都会收到 COM 互操作异常。我现在没有收到错误消息,但如果它进一步解决了问题,我可以将其发布。

我们使用 StarTeam 作为源代码控制,目前在尝试从源代码控制系统创建数据库时遇到重大问题。我有时会花几个小时重新尝试从源代码管理创建数据库,因为每次 Access 尝试导入 ACD 文件时都会出现未知故障。

我们尝试停用 Access 和 ACD 文件中的任何宏,这些宏可能在从数据库创建阶段自动激活。我们怀疑这可能会中断数据库创建过程,但问题仍然存在:经过多次尝试和部分纯粹的运气后,我们只能从源代码管理创建访问数据库!我想通过自动化整个事情来解决这个问题。

有些人可能会指出,最好的起点是找到从 Starteam 提取 ACD(和其他)源文件的问题。我(最初)对此的看法是,如果这纯粹是运气的话,我宁愿让它自动化,然后让计算机浪费时间尝试构建 Access 数据库,然后让我监视该过程。

任何关于如何解决在源代码控制系统中自动构建(即持续集成)获取 Access 数据库的问题的帮助或提示都是非常受欢迎的。

当然,我还想了解如何解决在没有一定运气的情况下无法从源代码管理创建数据库的问题的建议。

As part of our build process we have to create an Access ACCDB (2007) database. The database constitutes the current front-end of our application and must be (for other reasons) build during the initial phase of the build process.

Currently, this is a manual process which I'm hoping to automate. Our database consists of MANY tables, formulas, queries, etc. I believe we're actually close to the limit of what Access is actually able to handle so we try not to add anything further to it.

I've had a look at this project:
http://buildmsaccessdb.codeplex.com/

and it seems to work pretty well. However, in our project we also have an ACD file, which is a binary file that contains a number of systems related tables. I'm by no means a wizard when it comes to Access development. I've just taken over the task of handling the build process.

Whenever I use the above project to include the ACD file I get a COM interop exception. I don't have the error message in front of me right now, but I could post it if it furthers the cause.

We use StarTeam as our source control and are currently experiencing major issues, when trying to create our database from the source control system. I sometime spend hours just retrying to get the database created from source control because an unknown failure arises every time Access tries to import the ACD file.

We've tried to deactivate any macros in Access and the ACD file which might have been automatically activated during the creation from database phase. We suspected that this might have interrupted the database creation process, however the issue persisted: We're only able to create our access database from source control after numerous attempts and a portion of sheer luck! Something I would like to remedy by automating the whole thing.

Some of you might point out that the best place to start would be to find the issue with extracting the ACD (and other) source file from Starteam. My (initial) take on this is that if it comes down to sheer luck anyway, I would rather have it automated and then let a computer waste it's time trying to build the Access database then having me monitoring the process.

Any help or hints on how to resolve the issue of getting an Access database within a source control system build automatically (i.e. continuous integration) are most welcome.

Of course I would also like suggestions on how to resolve the issue of not being able to create the database from source control without a certain amount of dumb luck.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

筱果果 2024-12-27 19:00:52

我们最终设法解决了问题:

如果我们使用二进制 ACD 文件作为创建数据库的起点,那么一旦导入数据库,它的内容也将可用。使用它作为起点我的意思是

  1. 将 ACD 文件复制到适当的目标
  2. 将 acd 文件重命名为 MyCompanyName.accdb
  3. 提供 MyCompanyName.accdb 作为 MS Access 数据库以将文件导入到 MSBuildAccess 项目中

因此 ACD 文件不应该与其他文件一起导入,而不应将其作为起点。通过查看 codeplex 项目中的实际 msbuild 任务,这一点变得很明显。

除了上述步骤之外,我们还遇到了与 Ms Access 中的 UIRibbon 类相关的构建错误。通过创建 MSBuildAccess 项目文档中提到的参考文件解决了这个问题(请参阅 http://buildmsaccessdb.codeplex.com /文档)。

现在,我们只需要解决编译 access 数据库时的内存不足问题。随着我们缩小 Access 项目的规模,这种情况很可能会消失。根据我们的“经验”,我们的 Access 解决方案在模块、报告、表单等数量方面处于 Access 能够处理的极限。
有关该问题的更多信息,请参阅这些参考资料:

  • http://help.lockergnome.com/office2/Create-accde-file-error--ftopict802934.html
  • http://stackoverflow.com/questions/1300632/compiling-an- access-2007-accdb-into-accde
  • http://bytes.com/topic/access/answers/518438-cant-create-mde

We eventually managed to sort things out:

If we use the binary ACD file as the starting point for creating our database it's content will also be available once the database has been imported. By using it as a starting point I mean

  1. Copy the ACD file to the appropriate destination
  2. Rename the acd file to MyCompanyName.accdb
  3. Supply the MyCompanyName.accdb as the MS Access database to import files into in the MSBuildAccess project

So the ACD file shouldn't be imported along with the other files, rather it should be taken as the starting point. This became evident by looking at the actual msbuild task in the codeplex project.

In addition to the above steps, we also had a build error related to UIRibbon class in Ms Access. This was resolved by creating the reference file mentioned in the documentation of the MSBuildAccess project (see http://buildmsaccessdb.codeplex.com/documentation).

Now, we only need to resolve an out-of-memory issue when compiling our access database. This will most likely go away as we decrease the size of the Access project. It's our 'experience' that our Access solution is at the very limit of what Access is able to handle in terms of number of modules, reports, forms, etc.
See these references for more info on that issue:

  • http://help.lockergnome.com/office2/Create-accde-file-error--ftopict802934.html
  • http://stackoverflow.com/questions/1300632/compiling-an-access-2007-accdb-into-accde
  • http://bytes.com/topic/access/answers/518438-cant-create-mde
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文