如何判断用户是否专门打开数据库? [英] How can I tell if a user has a database open exclusively?

查看:79
本文介绍了如何判断用户是否专门打开数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有什么方法可以判断,或者用户自己可以判断他们是否有异常开放的数据库,即使他们无意中这样做了。

Is there any way that I can tell or the user themselves can tell if they have a database open exlusively even if they did this inadvertently.

我知道的唯一方法现在是尝试在他们登录之前打开数据库然后在他们登录之后。如果我可以在他们登录之前打开它而不是在他们登录之后打开它然后我假设他们只是打开它。

The only way I know right now is to try to open the database before they log in and then after they log in. If I can open it before they log in but not after they log in then I assume they are opening it exclusively.

推荐答案

您可以尝试独占打开数据库,如果不能,则处理错误。
You could try to open the database exclusively, and handle the error if you can't.


这篇关于如何判断用户是否专门打开数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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