多用途访问 [英] Multi use of Access

查看:27
本文介绍了多用途访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个 MS 应用程序,可供大约 10 个用户同时使用.性能很差,他们抱怨.另外,我很难部署新版本,因为有些用户让 Access 在夜间打开并且文件被锁定.有没有办法加快速度并部署新版本?

We have a MS Application which is used by around 10 users at the same time. The performance is poor and they complain. Plus I have hard time to deploy a new version because some users let the Access opened during the night and the file is locked. Is there a way how to speed it up and deploy a new version?

推荐答案

我们有 35 位用户使用前端 Access,其中只有表单和代码连接到 SQL 数据库.该 SQL 服务器上有 971 个表和视图 - 您可以使用不同的 Access 数据库并链接这些表而不是 SQL 服务器.带有代码的 Access 文件存储在共享驱动器上,用户不会直接使用它,而是通过 .bat 文件将 Access 复制到本地机器并运行它.当我需要部署新版本时,我只需覆盖共享驱动器上的 Access 文件(它永远不会被锁定,因为它不直接使用),下次用户开始工作时,他们会得到一个新版本.我什至有一个功能可以向用户显示该程序的新版本并要求他们重新启动.

We have 35 users using a front end Access with only forms and code connected to SQL database. There are 971 tables and views on that SQL server - you can use a different Access database and link the tables instead of SQL server. The Access file with code is stored on a shared drive and users do not lunch it direct but via a .bat file which copies the Access to the local machine and runs it. When I need to deploy a new version I just overwrite the Access file on the share drive (it is never locked because it is not used directly) and next time users start working they get a fresh version. I even have a functionality which displays to the users a note that there is a new version of the program and asks them to restart.

这是您的 .bat 文件的示例脚本(它还复制了一个文件以更改 Access 菜单栏):

Here is a sample script for your .bat file (it copies also a file to change Access menu bar):

echo off
echo Company Application v2016 [Staff] PROD
echo Deleting...
del "C:\Temp\"%Username%"\16Staff.accdb"
del "C:\Temp\"%Username%"\16Staff.laccdb"
del "C:\Users\"%Username%"\AppData\Local\Microsoft\Office\Access.officeUI"
c:
cd\
echo Creating Temp folder...
Md "C:\Temp"
MD "C:\Temp\"%UserName%
echo Copying...
xcopy /y "R:\Staff\Access.officeUI" "%USERPROFILE%"\AppData\Local\Microsoft\Office\
copy "R:\Staff\16Staff.accdb" "C:\Temp\"%Username%
echo Loading...
"C:\Program Files (x86)\Microsoft Office\Office16\MSAccess.exe" "C:\Temp\%Username%\16Staff.accdb" 
EXIT

这篇关于多用途访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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