Persist Security Info=False;

解决方案 »

  1.   

    我这儿可以.
    With DBConnect
         .Provider = "Microsoft.Jet.OLEDB.4.0"
         .Properties("Data Source").value = App.Path & "\data.mdb"
         .Properties("Persist Security Info").value = True
         .Properties("Jet OLEDB:Database Password").value = "pass"
    End With
      

  2.   

    access有两种密码,一种是用户密码,一种是文件密码。如果是后者:cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\example.mdb;Persist Security Info=True;Jet OLEDB:Database Password=123456"