通过网络共享mdb文件,对于许多计算机,无法编辑该应用程序 [英] Share a mdb file over network, for many computers, can't edit the application

查看:195
本文介绍了通过网络共享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的第一个用户才能编辑,添加和删除条目,其他用户可以这样做,但是更改不应用于db,看来它仅在用户计算机上本地应用.

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?

请记住,由于无法编辑Delphi应用程序,因此无法拆分.mdb.

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天全站免登陆