Excel ADODB VBA错误消息“无效密码" [英] Excel ADODB VBA error msg 'Not a Valid Password'

查看:495
本文介绍了Excel ADODB VBA错误消息“无效密码"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过Excel VBA打开受密码保护的AccessDB的连接.

I am trying to open a Connection to Password protected AccessDB, through Excel VBA.

我正在使用以下连接字符串

I am using the following connection string

conn.Provider = "Microsoft.ACE.OLEDB.12.0"
conn.ConnectionString = "Data Source=dbPath; Jet OLEDB:Database Password=pwd;"

其中dbPath是accdb/mdb文件的路径,而pwd是该dbfile的密码.密码是绝对正确的,但是我总是收到错误无效密码". 有人可以在这方面指导我吗? -斯里

where dbPath is the path of accdb/mdb file and pwd is the password to the dbfile. The password is absolutely correct but I am always getting the error "Not a Valid Password". Could someone please guide me in this?? -Sri.

其他信息: 我正在使用Office 2010并将此数据库另存为mdb(2003)文件(我也尝试使用accdb extn保存该文件). 当我尝试为数据库设置密码时,它显示消息"使用分组密码加密与行级锁定不兼容.行级锁定将被忽略." 与VBA中的错误msg有什么关系?

Additional Info: I am using office 2010 and saved this database as mdb(2003) file(I tried saving this file with accdb extn also). When i am trying to set a password to the database, it shows the msg "Encrypting with a block cipher is incompatible with row level locking. Row level locking will be ignored." Does it have anything to do with the error msg in VBA?

推荐答案

在Access 2010中,加密方法已更改为数据库密码,并且ADO提供程序的"Jet OLEDB:Database Password"关键字似乎不适用于新方法.在这里,我必须删除密码,进入访问"->文件"->选项"->客户端设置"->高级",然后选中使用旧版加密",然后重新创建密码.

In Access 2010 the encryption method changed for database passwords, and the ADO provider's "Jet OLEDB:Database Password" keyword does not appear to work with the new method. Here, I had to remove the password, go into Access->File->Options->Client Settings->Advanced and check "use legacy encryption", then recreate the password.

我不知道ACE提供程序是否有任何新的OLE DB连接字符串关键字,或者在使用ADO.NET时是否还会出现此问题

I do not know if there are any new OLE DB connection string keywords for the ACE provider or whether this problem also occurs when using ADO.NET

这篇关于Excel ADODB VBA错误消息“无效密码"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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