访问带密码的Access数据库出现问题!急!急!急!
用VB6.0访问带密码的Access数据库,运行时提示: "找不到可安装的ISAM "!请高手赐教,感激,加分!!!!
dim cnn as new ADODB.Connection
dim sj as new ADODB.Recordset
cnn.Connectstring= "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\1.mdb;Persist Security Info=True;Jet OLEDB:Database Password=1234 "
如果访问不加密码的Access数据库,可以!
但是数据库加了密码后,就出现上述问题!
[解决办法]
你的连接语句不对
Provider=Microsoft.Jet.OLEDB.4.0;Password=aa;Data Source=C:\aa.mdb;Persist Security Info=True
[解决办法]
cnn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Database Password= ' " & sPwd & " ';Persist Security Info=False;data source= " & sDb
[解决办法]
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source=c:\somepath\mydb.mdb; " & _
"Jet OLEDB:Database Password=MyDbPassword ", _
"myUsername ", "myPassword "
如果你以独占的方式打开:
Conn.Mode = adModeShareExclusive
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source=c:\somepath\myDb.mdb; " & _
"User Id=admin; " & _
"Password= "
For Standard Security:
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source=c:\somepath\myDb.mdb; " & _
"User Id=admin; " & _
"Password= "