通过网络共享一个mdb文件,对于很多电脑来说,无法编辑应用 [英] Share a mdb file over network, for many computers, can't edit the application

查看:123
本文介绍了通过网络共享一个mdb文件,对于很多电脑来说,无法编辑应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

该公司正在使用旧的 Delphi 软件,该软件使用 .mdb 文件作为数据库.

The company is using an old Delphi software, that uses a .mdb file as database.

我无法改变应用程序的工作方式,我没有它的源代码.

I can't change the way the application works, I don't have it's source.

我们面临许多问题,例如:

We are facing many problems such as:

  • 锁定问题
  • 当用户添加一个条目时,它不会更新数据库,它只会出现在本地

锁的问题暂时解决了,目前的问题是只有第一个连接到.mdb的用户可以编辑,添加和删除条目,其他用户这样做,但是更改未应用于数据库,它似乎仅适用于本地用户计算机上.

The lock problems are solved for now, currently, the problem is that only the first user that connects to the .mdb can edit, add and delete entries, the other users do that to, but the changes are not applied to the db, it seems it's only apply locally, on the user machine.

我的问题是,.mdb 是否应该与网络上的许多用户(3~4 人)一起工作?

My question is, is .mdb supposed to work with many users over the network(3~4 people)?

我能做些什么来使该软件与 .mdb 文件一起在许多用户中正常运行?

What Is there anything I can do to make this software works well with the .mdb file, with many users?

请记住,我无法拆分 .mdb,因为我无法编辑 Delphi 应用程序.

Remembering that I cannot split the .mdb, as I cannot edit the Delphi application.

推荐答案

您没有提到过去在多用户环境中是否可以正常工作.但是,请记住,用户必须具有完全读/写以及文件创建和删除权限.

You don’t mention that if this in the past work fine in a multi-user environment. However, keep in mind that users MUST have full read/write AND ALSO file create and delete rights.

创建和删除权限的原因是因为这是一个没有服务器进程的基于文件的"系统,所以在与后端mdb文件相同的目录中创建了一个锁定文件.当第一个用户打开文件时,他们没有文件夹的完全权限,然后文件以独占模式打开,所有其他用户都将是只读的.这因此解释了您的第一个用户的症状,但其他用户不起作用.(额外的用户将是只读的——显然 Delphi 软件没有检测到这个问题).因此,您可以查看数据,但无法保存数据.

The reason for the create and delete rights is that because this is a "file based" system without a server process, then a locking file is created in the same directory as the back end mdb file. When the first user opens the file, and they don’t have FULL RIGHTS to the folder, then the file is opened in exclusive mode, and all additional users will be read only. This thus explains your symptom of first user in, but additional users don’t work. (the additional users will be read only – and obviously the Delphi software does not detect this problem). So you can view data – but no saving of data can occur.

因此您需要确保所有用户都能够创建该锁定文件.它是由第一个用户创建的,打开后端的任何其他用户也需要对该文件的权限(所以不要错误地拥有对每个用户基本设置的文件夹的权限,因为那样第一个用户将导致 JET创建锁定文件,但对第一个用户具有权限!再次这将意味着其他用户将是只读的.因此其他用户必须能够打开锁定文件,并且第一个用户必须能够创建锁定文件.实际上,当无法创建锁定文件时,打开 Access 会将数据库 (mdb) 以独占方式打开并防止多用户.

So you need to ensure that all users have the ability to create that locking file. It is created by the first user, and any additional user opening the back end ALSO needs rights to that file (so don’t by mistake have permissions to the folder set on a per user basic, since then the first user in will cause JET to create the locking file but with permissions to that first user!. Once again this will mean additional users will be read only. So additional user MUST be able to open the locking file, and the first user in MUST be able to create the locking file. In fact open Access will open the database (mdb) as exclusive and prevent multi-user when the locking file cannot be created.

当最后一个用户离开数据库(或者在您的情况下离开 Delphi 应用程序)时,后端文件将关闭,并且数据库引擎 (JET) 也会删除锁定文件

When the last user leaves the database (or in your case leaves the Delphi application), then the back end file is closed and ALSO THE locking file is deleted by the database engine (JET)

所以这听起来像是您的 IT 人员没有为后端文件夹提供完全开放的权限.您可以"在删除文件删除权限的情况下运行数据库,但我强烈建议回收锁定文件也是一件好事,因为随着时间的推移它可能会损坏等.

So this sounds like your IT folks did not give wide open permissions to the back end folder. You "can" run the database with file delete rights removed, but I much suggest that the locking file being re-cycled is also a good thing since over time it can become damaged etc.

因此,根据您的症状,这是 Access 中非常常见的情况,通过授予所有用户足够的权限在与后端相同的文件夹中创建文件来解决此问题.(而不是基于每个用户的权限).

So based on your symptoms, this is a VERY common occurrence in Access, and this problem is fixed by giving all users sufficient permissions to create files in the same folder as the back end. (and not permissions based on per user).

所有用户必须能够创建 + 打开 + 使用由第一个打开 mdb 文件的用户创建的锁定文件.这种锁定文件的创建是自动的,由 JET 数据库而不是 Delphi 程序管理.

ALL users must be able to create + open + use that locking file created by the first user opening the mdb file. This locking file creation is automatic and managed by the JET database and not the Delphi program.

这篇关于通过网络共享一个mdb文件,对于很多电脑来说,无法编辑应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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