VB ADODB 连接access的问题
Private Sub Form_Load()Dim cnn As New ADODB.Connection
If Dir(App.Path + "\123.mdb") <> "" Then
cnn.ConnectionString = "provider=microsoft.jet.oledb.4.0;" + "data source=" + App.Path + "\123.mdb;"
cnn.Open
If cnn.State = adStateOpen Then
MsgBox "打开数据库"
End If
cnn.Close
If cnn.State = adStateClosed Then
MsgBox "关闭数据库"
End If
Else
MsgBox ("找不到人事数据库")
End If
End Sub
为什么显示找不到人事数据库。