谁登录BE数据库? [英] Who is logged on to BE database?

查看:94
本文介绍了谁登录BE数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要知道谁登录到网络上的BE数据库,所以在我说改变桌子设计或压缩BE之前,我可以让他们注销。

我希望通过检查laccdb文件来做到这一点。


此代码有效

I need to know who is logged on to a BE database on a network, so that before I say change the design of a table or compact the BE, I can get them to log off.

I had hoped to do it by examining the laccdb file.

This code works

展开 | 选择 | Wrap | 行号

推荐答案

嘿菲尔,

我在很长很长一段时间内都没有使用过锁文件,除非事情在某些方面变得更好我真的不建议依赖于中的信息它。


我尝试了类似于你几年前所做的事情而放弃了。我做了什么,在后端创建了一个表,有两个字段,一个DateTime和一个消息。然后在前端的主菜单中创建一个计时器,它将检查DateTime,如果它不是null,将来它会在主菜单的TextBox中显示Message,用于通知用户重要的事情。消息通常类似于数据库将在下午4:00进入维护状态,并且将在约3小时内停机。 1小时,请在此之前退出。此外,在主窗体计时器中,如果DateTime不为null并且在过去,则前端将退出。它已经有一段时间了,但是我认为如果应用程序是在msgBox中显示消息的DateTime之后启动的,那么我会输入一条消息,对于那些无法获得它的用户,他们至少会有一条消息每次他们顽固地重新申请时都会出现。然后在维护完成后,两个字段都被清除了。
Hey Phil,
I haven''t worked with a lockfile in a long, long time and unless things magically got better at some point I really wouldn''t recommend relying on the information that is in it.

I attempted something similar to what you are doing years ago and gave up. What I did instead, is created a Table in the Back End with two fields, a DateTime and a Message. Then created a timer in Main Menu of the Front End, that would check the DateTime and if it was not null and in the future, it displayed the Message in a TextBox on the Main Menu reserved for notifying the User of important things. The Message was usually something like "The database will going down for Maintenance at 4:00PM and will be down for approx. 1 Hour, please log out before then." Also, in the Main Forms Timer, if the DateTime was not null and in the Past, the Front End would exit. It''s been a while, but I think I put in a message if the application was started after the DateTime that displayed the Message in msgBox, for the user that just wouldn''t get it, they would at least have a message show up every time they stubbornly reran the application. Then after the maintenance was completed, both fields were cleared out.


谢谢jforbes。

浴缸里的一个很好的沉溺和离开电脑让我破解它。


现在我知道谁登录了,我可以在他们的屏幕上打开一个表格,告诉他们有x分钟的时间注销。


如果您需要,我将从我的数据库中提取相关位并在此处发布


Phil
Thanks jforbes.
A good wallow in the bath and getting away from the computer allowed me to crack it.

So now I know who is logged on and I can open a form on their screen telling them they have x minutes to log off.

If you need it, I will extract the relevant bits from my database and post them here

Phil


@ PhilOfWalton:

有一个非常方便的功能,你可能不知道在你的情况下你可能会觉得有趣。我指的是一个鲜为人知的Jet启用功能,它允许您阻止用户连接到数据库,您希望执行某种形式的管理任务,例如:设计更改,备份等。我所指的这个功能 ''被动关机'' 。我不会再烦你了,但如果你感兴趣的话,我会提供一篇文章链接。
https://bytes.com/topic/access/insig...ssive-shutdown


这篇关于谁登录BE数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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