在MS Access上与多个程序员一起工作

时间:2021-09-20 15:37:24

Would you recommend working with multiple programmers on an MS Access application?

您是否建议在MS Access应用程序上与多个程序员一起工作?

One of our MS Access application has grown to the point where the number of changes (bug fixes) and new features can no longer be handled by one programmer in the requested time frame.

我们的一个MS Access应用程序已经发展到一个程序员在请求的时间范围内无法再处理更改(错误修复)和新功能的程度。

We are trying to introduce version control using the undocumented SaveAsText and LoadFromText procedures in VBA to make collaboration on this application possible. Unfortunately we have already run into problems loading modified forms and reports back into Access as a checksum is stored in every form text file.

我们正在尝试使用VBA中未记录的SaveAsText和LoadFromText过程引入版本控制,以便在此应用程序上进行协作。遗憾的是,由于校验和存储在每个表单文本文件中,因此我们已经遇到了将修改后的表单和报表重新加载到Access中的问题。

Before putting time into building an import/export application to compile text files into an Access database, we would like to hear your recommendations.

在花时间构建导入/导出应用程序以将文本文件编译到Access数据库之前,我们希望听到您的建议。

6 个解决方案

#1


20  

I think you should avoid this path at all cost, and try and persuade management into redevelopment.

我认为你应该不惜一切代价避开这条道路,并试图说服管理层进行重建。

It's a bitter pill to swallow, but this is going to need to be redeveloped sooner or later, and you are just saving them time and money.

吞下这是一种苦果,但这需要迟早重新开发,而你只是节省时间和金钱。

#2


14  

We were using Microsoft's own version control add-in for MS Access 2000/2002/2003 for about 5 years now, and I can't remember a single serious problem. Usability of this add-in barely deserves a "B", but it must be much, much more convenient than fiddling with any ad-hoc method involving manual or semi-manual exporting/importing of Access forms, modules, etc.

我们在MS Access 2000/2002/2003上使用微软自己的版本控制插件已有5年了,我记不起一个严重的问题了。这个加载项的可用性几乎不值得“B”,但它必须比任何涉及手动或半手动导出/导入Access表单,模块等的特殊方法更方便。

We were using VSS as a version control system all the time. No problems whatsoever. However, if you have some good reasons to avoid VSS, you may have some options:

我们一直在使用VSS作为版本控制系统。没有任何问题。但是,如果您有充分的理由避免使用VSS,则可能有以下选择:

  • The version control add-in that we were using does not require VSS. Theoretically it can be used with any version control system that implements Microsoft Source Code Control Interface (MSCCI). For example, when we had to let somebody work on this project remotely, we used SourceOffsite by SourceGear. Access version control add-in worked with this third-party product fairly well (not without some quirks, but well enough). So, if your favorite version control system complies with MSCCI, you could try to use it.

    我们使用的版本控制加载项不需要VSS。从理论上讲,它可以与任何实现Microsoft源代码控制接口(MSCCI)的版本控制系统一起使用。例如,当我们不得不让某人远程处理这个项目时,我们使用了SourceGear的SourceOffsite。访问版本控制加载项可以很好地使用这个第三方产品(不是没有一些怪癖,但足够好)。因此,如果您最喜欢的版本控制系统符合MSCCI,您可以尝试使用它。

  • Now that Microsoft has this Team Foundation thingy, apparently there are other options to be used to integrate MS Access with version control. We did not explore this path, though. This article may be a good start for exploring it.

    既然微软拥有这个Team Foundation,显然还有其他选择可用于将MS Access与版本控制集成。但是,我们没有探索这条道路。本文可能是探索它的良好开端。

Hope this would be of some help. :-)

希望这会有所帮助。 :-)

P.S. I am not a big fan of MS Access. In fact, I rather hate it as a platform for a user front-end. If I had a choice, I would run away from it yesterday. :-) However, I must admit that existence of this version control add-in is one of the few things that makes maintenance of our old Access+SQLServer project more or less tolerable. :-))

附:我不是MS Access的忠实粉丝。事实上,我更讨厌它作为用户前端的平台。如果我有一个选择,我会在昨天逃避它。 :-)但是,我必须承认,这个版本控件加载项的存在是使我们的旧Access + SQLServer项目的维护或多或少可以容忍的少数几件事之一。 :-))

#3


9  

In addition to what I already said here, I should add that the whole system works very well. The comparison process takes less than 30 minutes a week, for a team of 3 programmers. So let's describe it a little bit.

除了我在这里已经说过的内容之外,我还要补充说整个系统运行良好。对于由3名程序员组成的团队,比较过程每周不到30分钟。所以让我们来描述一下。

We have basically 2 versions of our Access program:

我们基本上有两个版本的Access程序:

The "Developer's version", with all the stuff in it.

We each begin to work with an identical version of our developer's edition. As each one modifies or add parts of the code, we have to run some comparison routine on a regular basis. To do so, we have an object-export routine to a common "comparison" folder. An object (module for example) is exported as a text file (saveAsText command, do not work with tables, see infra), it will be compared to the existing equivalent text files in the folder. If files are identical, there is no file exported. If files are different, the new module is exported with the developer's name as an addition to the file name (if modQueries.txt exists, then modQueries_philippe.txt is created...). Of course if there is no equivalent .txt file in the folder, it will be created at first export.

我们每个人都开始使用相同版本的开发人员版本。当每个修改或添加代码的一部分时,我们必须定期运行一些比较例程。为此,我们有一个对象导出例程到一个常见的“比较”文件夹。将对象(例如模块)导出为文本文件(saveAsText命令,不与表一起使用,参见下文),它将与文件夹中现有的等效文本文件进行比较。如果文件相同,则不会导出文件。如果文件不同,则使用开发人员的名称导出新模块作为文件名的添加(如果存在modQueries.txt,则创建modQueries_philippe.txt ...)。当然,如果文件夹中没有等效的.txt文件,它将在首次导出时创建。

At the end of the period, we would get in our folder the following files

在期间结束时,我们将在我们的文件夹中包含以下文件

  1. modQueries.txt, being the first "original", last common version of the module
  2. modQueries.txt,是模块的第一个“原始”,最后一个常见版本

  3. modQueries_Philippe.txt, with Philippe's modifications
  4. modQueries_Philippe.txt,与Philippe的修改

  5. modQueries_Denise.txt, with Denise's modifications
  6. modQueries_Denise.txt,修改了Denise

  7. As the module was not modified by other developers, their export did not lead to the creation of a specific modQueries_developersName.txt file
  8. 由于该模块未被其他开发人员修改,因此其导出不会导致创建特定的modQueries_developersName.txt文件

  9. If for any reasons Denise exported many times her module, only the last version is in the comparison folder.
  10. 如果由于任何原因Denise导出了她的模块很多次,只有最后一个版本在比较文件夹中。

We can then compare (with a "text file" comparer) the different versions and create the "updated" version of the module. We have a screen giving us the number of objects in the comparison folder, number of version for each object, and it is even possible to open the file comparer directly from the developer's interface (We use "File Compare Tool" which has a command-line mode and can then be started directly from Access).

然后我们可以比较(使用“文本文件”比较器)不同的版本并创建模块的“更新”版本。我们有一个屏幕给出了比较文件夹中的对象数量,每个对象的版本数量,甚至可以直接从开发人员的界面打开文件比较器(我们使用“文件比较工具”,它有一个命令 - 行模式,然后可以直接从Access启动。

The forms compare issue is quite special, as one of our rules is to have no specific code in our forms (please see here for more details). Forms are then only for display, so usually we do not even compare them. We just make sure that each one of them is updated by only one person (which is quite logical).

表格比较问题非常特殊,因为我们的一个规则是在表格中没有特定的代码(请参阅此处了解更多详情)。然后表单只用于显示,所以通常我们甚至不比较它们。我们只是确保每个人都只有一个人更新(这是非常合乎逻辑的)。

The table compare issue (we have local tables) can be only made between mdb files. As we export one text file per module, we also export one mdb file per table. We have a small routine allowing us to identify table differences at the structure level or at the record level.

表比较问题(我们有本地表)只能在mdb文件之间进行。当我们为每个模块导出一个文本文件时,我们还会为每个表导出一个mdb文件。我们有一个小例程,允许我们在结构级别或记录级别识别表差异。

After each comparison procedure, a subroutine will use all the objects available ini the comparison folder and create a whole new clean mdb file from scratch. This is the new developer's version. Every developer can then copy it on his computer and continue his work.

在每个比较过程之后,子例程将使用比较文件夹中可用的所有对象,并从头开始创建一个全新的干净mdb文件。这是新开发者的版本。然后,每个开发人员都可以将其复制到计算机上并继续工作。

Developer's versions do not have numbers, but contains last client version number.

开发人员的版本没有数字,但包含最后一个客户端版本号。

The client version, with limited stuff, automatically distributed to users

Each developer has the possibility to build a "client" mdb for final users. This mdb is created from scratch, in a way quite similar to our developer's version, but not all objects are exported. Some specific switches are turned off (special keys, access to code, etc). This mdb holds a version number as a property. The version number is used to build the name of the mdb file.

每个开发人员都可以为最终用户构建“客户端”mdb。这个mdb是从头开始创建的,其方式与开发人员的版本非常相似,但并不是所有对象都是导出的。某些特定开关已关闭(特殊键,访问代码等)。此mdb包含版本号作为属性。版本号用于构建mdb文件的名称。

At production time, this mdb file is zipped and placed in a specific "distribution" folder. Each time a user starts the app, it will automatically check this folder to see if a new version is available. If yes, the client mdb file is updated from the distribution folder, and the app is restarted.

在生产时,此mdb文件被压缩并放置在特定的“分发”文件夹中。每次用户启动应用程序时,它都会自动检查此文件夹以查看是否有新版本可用。如果是,则从分发文件夹更新客户端mdb文件,并重新启动应用程序。

This distribution folder is replicated at night time with our overseas agencies. Users abroad will then be able to install the new version on the following day.

该分发文件夹在夜间与我们的海外代理商一起复制。然后,国外用户可以在第二天安装新版本。

#4


6  

Following the direction provided by Yarik we settled on continuing developing in Access using the Access Add-in Source Code Control, the SVN SCC API Plugin by PushOk Software and Subversion. This stack provides us with seamless Access integration, full-backup and restore and an open version control system.

按照Yarik提供的指示,我们决定继续使用Access Add-in源代码控制开发Access,PushOk软件和Subversion的SVN SCC API插件。该堆栈为我们提供了无缝的Access集成,完全备份和恢复以及开放版本控制系统。

We had to install a hotfix to Access 2003 and make sure the default database file type matched our database file type to make it work.

我们必须为Access 2003安装一个修补程序,并确保默认数据库文件类型与我们的数据库文件类型匹配,以使其工作。

We will continue to update this answer with our findings.

我们将继续用我们的研究结果更新这个答案。

#5


1  

Have look at this thread:

看看这个帖子:

How do you use version control with Access development?

如何在Access开发中使用版本控制?

#6


0  

Sounds like a terribly painful way to do team development. If you have any options for porting to another environment like VS2008 that would be my recommendation.

听起来像是一个非常痛苦的团队发展方式。如果您有任何移植到VS2008等环境的选项,那将是我的建议。

There is no easy way to work on Access as a team and even version control might be a bit tricky.

作为一个团队,没有简单的方法来处理Access甚至版本控制可能有点棘手。

#1


20  

I think you should avoid this path at all cost, and try and persuade management into redevelopment.

我认为你应该不惜一切代价避开这条道路,并试图说服管理层进行重建。

It's a bitter pill to swallow, but this is going to need to be redeveloped sooner or later, and you are just saving them time and money.

吞下这是一种苦果,但这需要迟早重新开发,而你只是节省时间和金钱。

#2


14  

We were using Microsoft's own version control add-in for MS Access 2000/2002/2003 for about 5 years now, and I can't remember a single serious problem. Usability of this add-in barely deserves a "B", but it must be much, much more convenient than fiddling with any ad-hoc method involving manual or semi-manual exporting/importing of Access forms, modules, etc.

我们在MS Access 2000/2002/2003上使用微软自己的版本控制插件已有5年了,我记不起一个严重的问题了。这个加载项的可用性几乎不值得“B”,但它必须比任何涉及手动或半手动导出/导入Access表单,模块等的特殊方法更方便。

We were using VSS as a version control system all the time. No problems whatsoever. However, if you have some good reasons to avoid VSS, you may have some options:

我们一直在使用VSS作为版本控制系统。没有任何问题。但是,如果您有充分的理由避免使用VSS,则可能有以下选择:

  • The version control add-in that we were using does not require VSS. Theoretically it can be used with any version control system that implements Microsoft Source Code Control Interface (MSCCI). For example, when we had to let somebody work on this project remotely, we used SourceOffsite by SourceGear. Access version control add-in worked with this third-party product fairly well (not without some quirks, but well enough). So, if your favorite version control system complies with MSCCI, you could try to use it.

    我们使用的版本控制加载项不需要VSS。从理论上讲,它可以与任何实现Microsoft源代码控制接口(MSCCI)的版本控制系统一起使用。例如,当我们不得不让某人远程处理这个项目时,我们使用了SourceGear的SourceOffsite。访问版本控制加载项可以很好地使用这个第三方产品(不是没有一些怪癖,但足够好)。因此,如果您最喜欢的版本控制系统符合MSCCI,您可以尝试使用它。

  • Now that Microsoft has this Team Foundation thingy, apparently there are other options to be used to integrate MS Access with version control. We did not explore this path, though. This article may be a good start for exploring it.

    既然微软拥有这个Team Foundation,显然还有其他选择可用于将MS Access与版本控制集成。但是,我们没有探索这条道路。本文可能是探索它的良好开端。

Hope this would be of some help. :-)

希望这会有所帮助。 :-)

P.S. I am not a big fan of MS Access. In fact, I rather hate it as a platform for a user front-end. If I had a choice, I would run away from it yesterday. :-) However, I must admit that existence of this version control add-in is one of the few things that makes maintenance of our old Access+SQLServer project more or less tolerable. :-))

附:我不是MS Access的忠实粉丝。事实上,我更讨厌它作为用户前端的平台。如果我有一个选择,我会在昨天逃避它。 :-)但是,我必须承认,这个版本控件加载项的存在是使我们的旧Access + SQLServer项目的维护或多或少可以容忍的少数几件事之一。 :-))

#3


9  

In addition to what I already said here, I should add that the whole system works very well. The comparison process takes less than 30 minutes a week, for a team of 3 programmers. So let's describe it a little bit.

除了我在这里已经说过的内容之外,我还要补充说整个系统运行良好。对于由3名程序员组成的团队,比较过程每周不到30分钟。所以让我们来描述一下。

We have basically 2 versions of our Access program:

我们基本上有两个版本的Access程序:

The "Developer's version", with all the stuff in it.

We each begin to work with an identical version of our developer's edition. As each one modifies or add parts of the code, we have to run some comparison routine on a regular basis. To do so, we have an object-export routine to a common "comparison" folder. An object (module for example) is exported as a text file (saveAsText command, do not work with tables, see infra), it will be compared to the existing equivalent text files in the folder. If files are identical, there is no file exported. If files are different, the new module is exported with the developer's name as an addition to the file name (if modQueries.txt exists, then modQueries_philippe.txt is created...). Of course if there is no equivalent .txt file in the folder, it will be created at first export.

我们每个人都开始使用相同版本的开发人员版本。当每个修改或添加代码的一部分时,我们必须定期运行一些比较例程。为此,我们有一个对象导出例程到一个常见的“比较”文件夹。将对象(例如模块)导出为文本文件(saveAsText命令,不与表一起使用,参见下文),它将与文件夹中现有的等效文本文件进行比较。如果文件相同,则不会导出文件。如果文件不同,则使用开发人员的名称导出新模块作为文件名的添加(如果存在modQueries.txt,则创建modQueries_philippe.txt ...)。当然,如果文件夹中没有等效的.txt文件,它将在首次导出时创建。

At the end of the period, we would get in our folder the following files

在期间结束时,我们将在我们的文件夹中包含以下文件

  1. modQueries.txt, being the first "original", last common version of the module
  2. modQueries.txt,是模块的第一个“原始”,最后一个常见版本

  3. modQueries_Philippe.txt, with Philippe's modifications
  4. modQueries_Philippe.txt,与Philippe的修改

  5. modQueries_Denise.txt, with Denise's modifications
  6. modQueries_Denise.txt,修改了Denise

  7. As the module was not modified by other developers, their export did not lead to the creation of a specific modQueries_developersName.txt file
  8. 由于该模块未被其他开发人员修改,因此其导出不会导致创建特定的modQueries_developersName.txt文件

  9. If for any reasons Denise exported many times her module, only the last version is in the comparison folder.
  10. 如果由于任何原因Denise导出了她的模块很多次,只有最后一个版本在比较文件夹中。

We can then compare (with a "text file" comparer) the different versions and create the "updated" version of the module. We have a screen giving us the number of objects in the comparison folder, number of version for each object, and it is even possible to open the file comparer directly from the developer's interface (We use "File Compare Tool" which has a command-line mode and can then be started directly from Access).

然后我们可以比较(使用“文本文件”比较器)不同的版本并创建模块的“更新”版本。我们有一个屏幕给出了比较文件夹中的对象数量,每个对象的版本数量,甚至可以直接从开发人员的界面打开文件比较器(我们使用“文件比较工具”,它有一个命令 - 行模式,然后可以直接从Access启动。

The forms compare issue is quite special, as one of our rules is to have no specific code in our forms (please see here for more details). Forms are then only for display, so usually we do not even compare them. We just make sure that each one of them is updated by only one person (which is quite logical).

表格比较问题非常特殊,因为我们的一个规则是在表格中没有特定的代码(请参阅此处了解更多详情)。然后表单只用于显示,所以通常我们甚至不比较它们。我们只是确保每个人都只有一个人更新(这是非常合乎逻辑的)。

The table compare issue (we have local tables) can be only made between mdb files. As we export one text file per module, we also export one mdb file per table. We have a small routine allowing us to identify table differences at the structure level or at the record level.

表比较问题(我们有本地表)只能在mdb文件之间进行。当我们为每个模块导出一个文本文件时,我们还会为每个表导出一个mdb文件。我们有一个小例程,允许我们在结构级别或记录级别识别表差异。

After each comparison procedure, a subroutine will use all the objects available ini the comparison folder and create a whole new clean mdb file from scratch. This is the new developer's version. Every developer can then copy it on his computer and continue his work.

在每个比较过程之后,子例程将使用比较文件夹中可用的所有对象,并从头开始创建一个全新的干净mdb文件。这是新开发者的版本。然后,每个开发人员都可以将其复制到计算机上并继续工作。

Developer's versions do not have numbers, but contains last client version number.

开发人员的版本没有数字,但包含最后一个客户端版本号。

The client version, with limited stuff, automatically distributed to users

Each developer has the possibility to build a "client" mdb for final users. This mdb is created from scratch, in a way quite similar to our developer's version, but not all objects are exported. Some specific switches are turned off (special keys, access to code, etc). This mdb holds a version number as a property. The version number is used to build the name of the mdb file.

每个开发人员都可以为最终用户构建“客户端”mdb。这个mdb是从头开始创建的,其方式与开发人员的版本非常相似,但并不是所有对象都是导出的。某些特定开关已关闭(特殊键,访问代码等)。此mdb包含版本号作为属性。版本号用于构建mdb文件的名称。

At production time, this mdb file is zipped and placed in a specific "distribution" folder. Each time a user starts the app, it will automatically check this folder to see if a new version is available. If yes, the client mdb file is updated from the distribution folder, and the app is restarted.

在生产时,此mdb文件被压缩并放置在特定的“分发”文件夹中。每次用户启动应用程序时,它都会自动检查此文件夹以查看是否有新版本可用。如果是,则从分发文件夹更新客户端mdb文件,并重新启动应用程序。

This distribution folder is replicated at night time with our overseas agencies. Users abroad will then be able to install the new version on the following day.

该分发文件夹在夜间与我们的海外代理商一起复制。然后,国外用户可以在第二天安装新版本。

#4


6  

Following the direction provided by Yarik we settled on continuing developing in Access using the Access Add-in Source Code Control, the SVN SCC API Plugin by PushOk Software and Subversion. This stack provides us with seamless Access integration, full-backup and restore and an open version control system.

按照Yarik提供的指示,我们决定继续使用Access Add-in源代码控制开发Access,PushOk软件和Subversion的SVN SCC API插件。该堆栈为我们提供了无缝的Access集成,完全备份和恢复以及开放版本控制系统。

We had to install a hotfix to Access 2003 and make sure the default database file type matched our database file type to make it work.

我们必须为Access 2003安装一个修补程序,并确保默认数据库文件类型与我们的数据库文件类型匹配,以使其工作。

We will continue to update this answer with our findings.

我们将继续用我们的研究结果更新这个答案。

#5


1  

Have look at this thread:

看看这个帖子:

How do you use version control with Access development?

如何在Access开发中使用版本控制?

#6


0  

Sounds like a terribly painful way to do team development. If you have any options for porting to another environment like VS2008 that would be my recommendation.

听起来像是一个非常痛苦的团队发展方式。如果您有任何移植到VS2008等环境的选项,那将是我的建议。

There is no easy way to work on Access as a team and even version control might be a bit tricky.

作为一个团队,没有简单的方法来处理Access甚至版本控制可能有点棘手。