求助……连接ACCESS的问题……
Dim DBCON As New ADODB.Connection
Dim accCon As String
accCon = "Provider=Microsoft.Jet.OLEDB.3.51;Data Source= " & _
App.Path & _
"\DataBase\database.mdb;Persist Security Info=False "
DBCON.ConnectionString = accCon
DBCON.Open '此处报错
'实时错误 '-2147418113 (8000ffff) '
'灾难性错误
不知道是哪里的问题……急……请大家赐教了……
[解决办法]
Public strConnection As String
Public conn As ADODB.Connection
strAppPath = app.path & "\Data\ServiceData.mdb "
strConnection = "DRIVER=Microsoft Access Driver (*.mdb);pwd=369netserver;DBQ= " & strAppPath & "; "
'打开连接
Set conn = New Connection
Set Rs = New Recordset
With conn
.ConnectionString = strConnection
.CursorLocation = adUseClient
.CommandTimeout = 30
.Open
End With
[解决办法]
何不用ado控件先试试联接是否有问题呢?如果通过再copy联接字串不好吗?