与数据库文件连接时出现问题 [英] Problem while connecting with database file
本文介绍了与数据库文件连接时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试连接MS Access数据库.
当我按下测试连接"按钮时,在添加连接表单中,显示以下错误.
Hi,
I am trying to connect with a MS Access database.
In the add connection form when I press Test connection button, it shows following error.
Invalid authorization specification.
我的数据库文件是C:\ Program Files \ Microsoft Visual Studio \ vb98 \ Nwind.mdb.
请指导我.
My database file is C:\Program files\Microsoft visual studio\vb98\Nwind.mdb.
Please guide me.
推荐答案
由于ConnectionString中的语法错误,我认为您正面临该问题.请检查您的ConnectionString是否正确
格式化.
连接字符串格式:
I think you are facing that problem because of the Syntax error in the ConnectionString.Please Check that the your ConnectionString is Properly
formatted.
Connection String Format:
ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Application.StartupPath & "\DataBaseName.mdb;Persist Security Info=True;Jet OLEDB:Database Password=12478653"
如果您的数据库没有任何密码,则ConnectionString:
If your DataBase does not have any Password then ConnectionString :
ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Application.StartupPath & "\DataBaseName.mdb;Persist Security Info=True";
在测试连接"按钮上,只需打开连接"即可.
On Test Connection Button Just Open Connection.
尝试以下操作:
http://support.microsoft.com/kb/821765 [
Try this:
http://support.microsoft.com/kb/821765[^]
hope it helps :)
http://connectionstrings.com/ [
这篇关于与数据库文件连接时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文