如何在窗口应用程序中将 ms access 作为客户端服务器进行部署和管理
我没有在窗口应用程序中使用 ms-access 作为客户端服务器的经验。让我了解以下一些知识 -
- 在服务器中,我是否只需将此访问数据库放在共享文件夹中?在客户端,只需指向这条路径?我可以获得示例路径语法吗?
- 四个用户将使用此数据库。我应该怎么做并发?会有插入、更新和删除操作。
谢谢。
I don't have experience in using ms-access as client-server in window application. Let me get knowledge about some below -
- In server, do I just place this access db in a share folder? And in client, just point to this path? Could i get a sample path syntax?
- Four users will use this db. how should I do for concurrency? There will be insert, update and delete operation.
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我对您在这里收到的回复类型感到担忧。您无法可靠地共享任何 Access 前端,无论它是否拆分。对于您的问题:
您首先需要将应用程序分成两个文件,一个是后端文件,除了数据表外什么都没有,另一个文件是前端用户界面对象(表单/报告/查询/等)和链接表(而不是本地表)。仅后端文件放置在服务器上。每个单独的用户都会获得前端的副本。
链接表应与 UNC 路径链接,即
\\Server\Databases\MyDataFile.mdb
,而不是使用映射驱动器(在不同工作站上可能有不同的映射)。您可能会发现我的帖子设置适当的 Access 开发环境很有用。它还讨论了部署和拆分应用程序。有关详细信息,您可能会找到Tony Toews 关于该主题的一组文章 有帮助。
顺便说一下,拆分架构一直是 Access 应用程序唯一可行的部署方法。我一直想知道为什么微软没有在其文档中更好地解释这一点。
四个用户应该是微不足道的,但这完全取决于您拥有的数据类型的性质以及用户如何编辑它。如果单个记录需要由多个用户编辑,那么很容易出现编辑冲突。另一方面,如果用户通常插入和编辑自己的记录并且与其他用户没有真正重叠,则应该很少或根本没有并发问题。
有关记录锁定问题的一些详细考虑,请参阅我很久以前的一篇文章,其中考虑了 设置 Access 数据库以供多用户访问。
I'm concerned about the type of responses you're getting here. You can't reliably share any Access front end, whether it's split or not. To your questions:
You first need to SPLIT your application into two files, one, the back end, with nothing but data tables, and the other with the front-end user interface objects (forms/reports/queries/etc.) and linked tables (instead of local tables). Only the back end file is placed on the server. Each individual user will get a copy of the front end.
The linked tables should be linked with UNC paths, i.e.,
\\Server\Databases\MyDataFile.mdb
, instead of using mapped drives (which could be mapped differently on different workstations).You might find a posting of mine about setting up a proper Access development environment useful. It also discusses deployment and splitting the app. For more information on that you might find Tony Toews set of articles on the subject helpful.
By the way, the split architecture has always been the only viable deployment approach for Access apps. I have always wondered why MS doesn't do a better job in its documentations of explaining this.
Four users should be trivial, but it entirely depends on the nature of the kind of data you have and how the users are editing it. If a single record needs to be edited by multiple users, then you could easily have edit collisions. On the other hand, if users are usually inserting and editing their own records and not really overlapping with the other users, there should be little or no concurrency problems at all.
For some detailed consideration of record locking issues, see a post of mine from a long time ago that considers the subject of setting up an Access database for multi-user access.
当多个用户通过网络访问它时,您(和您的应用程序)需要开始考虑如何处理网络中断(客户端启动,服务器关闭)、连接问题(一个用户可以访问数据库,另一个用户不能)等问题、数据库备份(您当前的备份和恢复策略是什么?)等。
With multiple users hitting it across the network you (and your application) need to start considering things like how to handle network outages (client is up, server is down), connectivity problems (one user can hit the database, another can't), database backups (what's your current backup and restore strategy?), etc.