访问数据库连接 [英] access database connectivity

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

问题描述

请帮助我,我正面临这个问题:


''/''应用程序中的服务器错误.
-------------------------------------------------- ------------------------------

Microsoft Jet数据库引擎无法打开文件``C:\ sntinewhomepage \ data \ SNTI.mdb''.它已经由另一个用户独占打开,或者您需要权限才能查看其数据.
说明:执行当前Web请求期间发生未处理的异常.请查看堆栈跟踪,以获取有关错误及其在代码中起源的更多信息.

异常详细信息:System.Data.OleDb.OleDbException:Microsoft Jet数据库引擎无法打开文件"C:\ sntinewhomepage \ data \ SNTI.mdb".它已经由另一个用户专门打开,或者您需要权限才能查看其数据.

源错误:


第45行:Dim bix作为字符串
第46行:Dim dr1 As OleDbDataReader
第47行:con1.Open()\\这里发生错误\\
第48行:cmd1 = New OleDbCommand(从反馈中选择max(sno)+1"),con1)
第49行:

Please help me i am facing this problem:


Server Error in ''/'' Application.
--------------------------------------------------------------------------------

The Microsoft Jet database engine cannot open the file ''C:\sntinewhomepage\data\SNTI.mdb''. It is already opened exclusively by another user, or you need permission to view its data.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: The Microsoft Jet database engine cannot open the file ''C:\sntinewhomepage\data\SNTI.mdb''. It is already opened exclusively by another user, or you need permission to view its data.

Source Error:


Line 45: Dim bix As String
Line 46: Dim dr1 As OleDbDataReader
Line 47: con1.Open() \\error occurs here\\
Line 48: cmd1 = New OleDbCommand("select max(sno)+1 from Feedback", con1)
Line 49:

推荐答案

我认为您已经手动打开了访问数据库,然后尝试连接同一数据库

希望这会有所帮助,然后接受并投票回答
--Rahul D.
I think you have opened the access database manually then tried to connect the same database

Hope this helps if yes then accept and vote the answer
--Rahul D.


这可能是由于没有.葡萄干
1 =>
在数据库文件打开的情况下检查您是否正在运行项目.
关闭Access文件,然后运行.
2 =>
它由另一个进程使用.
打开任务管理器,检查是否有任何或当前的应用程序(使用相同的数据库)正在运行,并且您尝试再次运行.
终止该进程,然后运行..
希望它能解决您的问题.
This can be due to a no. of raesons
1=>
Check you run your project while database file is open.
Close Access file and then run.
2=>
It is used by another Process.
Open Task Manager and check if any or current application(that used same database) running and you tried to run again.
Kill that process and then runs..
Hope It Solves your problem.


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

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