access数据库与VB连用问题
各位大神:我编程为什么出现这种情况,跪求帮忙
代码:Private Sub Command1_Click()
Dim a!, b!, c!
Dim l(1 To 5) As Single
Dim h(1 To 5) As Single
Dim Ls(1 To 5) As Single
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\电影\Database13.mdb;Persist Security Info=False"
= adCmdUnknown
Adodc1.RecordSource = "select * from 表1"
Adodc1.Refresh
For a = 1 To 5
l(a) = Val(Adodc1.Recordset.Fields(1))
Adodc1.Recordset.MoveNext
Next a
For a = 1 To 5
h(a) = Val(Adodc1.Recordset.Fields(2))
Adodc1.Recordset.MoveNext
Next a
c = 1
Do While c < 6
Ls(c) = h(c) + l(c)
Label1.Caption = Label1.Caption & Ls(c) & vbCrLf
c = c + 1
Loop
End Sub
然后出现
数据库是