MS Access 2007可以支持多用户环境吗? [英] Can MS Access 2007 support multiuser environment?

查看:61
本文介绍了MS Access 2007可以支持多用户环境吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个应用程序正在多台计算机上运行(大约在2台计算机上运行).该应用程序更新了放置在网络上的共享mdb.两个用户都试图一次更新共享mdb,但问题是只有一个用户能够一次更新mdb.另一个用户无法打开它.有人可以建议访问支持多用户环境吗?

There is an application which is running on several machines(say roughly on 2).This application updates an shared mdb placed on network.Both users are trying to update the shared mdb at one time but the problem is only one user is able to update mdb at one time.Another user is not able to open it.Can anyone suggest that access support multiuser environment?


TFormRoadAttrib有一种形式.当它激活时,将调用以下函数

edit:
There is one form TFormRoadAttrib.When it activates following function is called

procedure TFrmRoadAttrib.FormActivate(Sender: TObject);
if dmTimeDomain <> nil then
   begin
     if not (dmTimeDomain.dbTimeDomain.InTransaction) then
     begin
       dmTimeDomain.dbTimeDomain.BeginTrans;
     end;
   end;

其中dbTimeDomain=TADOConnection及其值为

'Provider=Microsoft.ACE.OLEDB.12.0;
Mode=Share Deny None;
Extended Properties="";
Locale Identifier=1033;
Jet OLEDB:Registry Path="";
Jet OLEDB:Database Password="";
Jet OLEDB:Engine Type=4;
Jet OLEDB:Database Locking Mode=0;
Jet OLEDB:Global Partial Bulk Ops=2;
Jet OLEDB:Global Bulk Transactions=1;
Jet OLEDB:New Database Password="";
Jet OLEDB:Create System Database=False;
Jet OLEDB:Encrypt Database=False;
Jet OLEDB:Don't Copy Locale on Compact=False;
Jet OLEDB:Compact Without Replica Repair=False;
Jet OLEDB:SFP=False;
Data Source=Q:\BEL_01\BEL_GADM\ACCESS\Restrictions.mdb;
Jet OLEDB:System database=C:\Program Files\Tele Atlas\Common Files\DPT.MDW;
User ID=dbadpt;
Password=dbadpt;

当我们单击确定"按钮时,将执行以下代码

When we click on Ok button following code executes

if dmTimeDomain <> nil then
 begin
      if (dmTimeDomain.dbTimeDomain.InTransaction) then
            dmTimeDomain.dbTimeDomain.CommitTrans;
     end;
end;                                                                

请提出建议.

推荐答案

访问肯定支持多用户环境,但是必须正确设置权限.所有用户都必须能够在数据库所在目录中创建文件,并且所有用户必须有权修改其他用户在该目录中创建的文件.有很多方法可以解决这个问题.这是因为Access使用一个单独的.ldb文件作为其管理并发多用户访问的机制的一部分.

Access definitely supports a multi-user environment, but your permissions must be set correctly. All users must be able to create files in the directory where the database is located, and all users must have permission to modify files created in that directory by other users. There are many ways to mess that up. This is because Access uses a separate .ldb file as part of its mechanism for managing concurrent, multi-user access.

一个好的测试是让一个用户在共享目录中创建一个文本文件,然后确保另一用户可以打开该文件,然后保存对它的更改.

A good test is to have one user create a text file in the shared directory, and then make sure the other user can open that file, and then save a change to it.

这篇关于MS Access 2007可以支持多用户环境吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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