Multi use of Access

◇◆丶佛笑我妖孽 提交于 2021-01-28 09:24:02

问题


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?


回答1:


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.

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


来源:https://stackoverflow.com/questions/60458913/multi-use-of-access

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!