如何远程淘汰用户或从数据库中断开用户连接? [英] How do you knock out users or Disconnect users from a database remotely?

查看:165
本文介绍了如何远程淘汰用户或从数据库中断开用户连接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有多个Access 2003数据库。我一直在做大部分的编辑工作。我遇到的问题是整个州的用户都在数据库中,并且不会得到它。我目前使用LDB Viewer。 (这只是告诉我当前连接的计算机名称)。但是,有没有一种方法可以写出一些会让所有人都知道的东西,无论我选择谁,所以我可以编辑数据库?


谢谢

解决方案

我在后端数据库中保存了一个表,用于存储用户登录/注销信息。我也有一个只有我可以访问的布尔字段。在客户端前端,有一个隐藏的表单,每5分钟检查一次该表。如果布尔字段设置为True,则它会保存它们正在工作的任何记录,将其记录下来并关闭访问权限。


因此,我可以随时登录并检查谁正在积极使用数据库,并发出警告或明确表示全部。它适用于我正在进行深夜更新时,我发现有3个人在他们离开时离开了他们的数据库。


此外,您使用的是前端/后端最终为您的客户设置好吗?他们不是都登录到同一个文件?


不容易。


锁定系统旨在保护数据的完整性在数据库中。您需要在开发的任何代码中考虑到这一点。我怀疑这样的事情需要非常谨慎,以确保数据在此过程中不会受到任何影响。


该网站下载了一个工作示例和一个数字关于检测谁正在使用数据库的其他链接:

http://www.accessmvp.com/JConrad/acc...e/kickoff.html

Linq ; 0) >

I have multiple Access 2003 databases. I do most of the editing in them all the time. I am having a problem of users all over the state being in the database, and won''t get off of it. I currently use LDB Viewer. (Which just tells me the computer name that''s currently connected). But, is there a way I can write something that will knock everyone out, of whomever I choose, so I can edit the database?

Thanks

解决方案

I keep a table in the backend database that stores user login/logout information. I also have a boolean field that only I can access. In the client frontend, there is a hidden form that checks that table every 5 minutes. If the boolean field is set to True, then it saves whatever record they are working, logs them out, and closes access.

So, at any time I can log in and check who''s actively using the database, and issue warnings or plain kick them all out. It works great for when I''m doing a late night update and I discover that 3 people left their databases running when they left.

Also, you are using a Front End/Back End setup for your clients right? They''re not all logged into the same file?


Not easy.

The locking system is designed to protect the integrity of the data within the database. You''d need to take that into consideration in any code you developed. I suspect something like this would involve a great deal of care taken to ensure the data was not compromised in any way in the process.


This site has a download with a working example and a number of other links concerning detecting who''s currently using the database:

http://www.accessmvp.com/JConrad/acc...e/kickoff.html

Linq ;0)>


这篇关于如何远程淘汰用户或从数据库中断开用户连接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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