各位请帮帮忙
Private Sub Form_Load()
Dim cnn As ADODB.Connection
cnn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\lcsys\mysjk\图书.mdb;"
cnn.Open
If cnn.State = adStateOpen Then
MsgBox "打开数据库"
End If
cnn.Close
If cnn.State = adStateClosed Then
MsgBox "关闭数据库"
End If
End Sub
这段程序运行后,出现以提示:
“对象变量或with块变量未设置”
请问这是什么原因??