连接到已在使用中的数据库; [英] Connect to the Database which in Already in Use;

查看:71
本文介绍了连接到已在使用中的数据库;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我正在尝试连接到数据库.

数据库是MS Access DB.

触发Connection.Open时,引发一个异常,提示无法连接,已经在使用中.

如何连接到已使用的数据库;
什么是连接字符串?

谢谢和问候

Lakshman

Hello,

i am trying to connect to the Database.

Database is MS Access DB.

On Connection.Open is fired, An Exception mentioning Unable to Connect, Already in Use is Raised.

How can i Connect to the Database which in Already in Use;
What will be the Connection String?

Thanks and regards

Lakshman

推荐答案

在不知道确切错误消息的情况下,在某种程度上可以猜测是可行的,但是最可能的原因是该数据库已经打开,可以由另一个进程进行独占访问/线程/计算机.查找并停止排他!
Without knowing the exact error message it is guess work to some extent, but the most likely reason is that the database is already open for exclusive access by another process / thread / computer. Find which, and stop it being exclusive!


您可以检查连接是否打开
通过代码.
you can check whether connection is open or not
through code.


可能是您的Access数据库处于修改模式(我的意思是您正在另一个窗口中更改数据库中任何表的结构).因此,保存并关闭数据库,然后重试.

如果没有,请让我们知道完整的细节.
May be your Access database in modify mode(I mean you are changing structure of any table in database in another window). So save & close the database & try again.

If not please let us know the complete details.


这篇关于连接到已在使用中的数据库;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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