我无法使用密码打开DAO数据库。 我在系统中安装了Access 2016并使用vb2017。
这是错误:
System.Runtime.InteropServices.COMException:'ODBC-连接到 ”失败。'
Dim ms1 As MsgBoxResult
Dim fullPath As String = AppDomain.CurrentDomain.BaseDirectory
Dim engdb As DAO.DBEngine = New DAO.DBEngine
Dim db As DAO.Database
Dim rs2 As DAO.Recordset
db = engdb.OpenDatabase(fullPath & "<filename>.accdb", _
False, False, "PWD=my password") '<==== error
'.
'.
end sub