大神帮我看看吧,看哪里不对
这里定义了很多,都是数据库的字段。Private Sub Command6_Click()
Dim g(1 To 10000) As Double
Dim m(1 To 10000) As String
Dim s(1 To 10000) As String
Dim gdl(1 To 10000) As String
Dim gdr(1 To 10000) As String
Dim gxl(1 To 10000) As String
Dim gxr(1 To 10000) As String
Dim sjk(1 To 10000) As String
Dim jh(1 To 10000) As Double
Dim jv(1 To 10000) As Double
Adodc1.ConnectionString = ConnectString()
Adodc1.RecordSource = "select * from caseTraceGeometric"
Adodc1.Refresh
Adodc1.Recordset.MoveFirst
For i = 1 To 10000
m(i) = Adodc1.Recordset.Fields("pkid").Value
g(i) = Adodc1.Recordset.Fields(3).Value '轨距
s(i) = Adodc1.Recordset.Fields(4).Value '水平
gdl(i) = Adodc1.Recordset.Fields(5).Value '左高低
gdr(i) = Adodc1.Recordset.Fields(6).Value '右高低
gxl(i) = Adodc1.Recordset.Fields(7).Value '左轨向
gxr(i) = Adodc1.Recordset.Fields(8).Value '右轨向
sjk(i) = Adodc1.Recordset.Fields(9).Value '三角坑
jh(i) = Adodc1.Recordset.Fields(10).Value '横向加速度
jv(i) = Adodc1.Recordset.Fields(11).Value '垂向加速度
Adodc2.ConnectionString = ConnectString1()
Adodc2.Recordset="select * from 超限 where pkid =' " # m # " ' "
Adodc2.Refresh
之后是一些if语句,最后有next
这里,倒数第二行 Adodc2.Recordset="select * from 超限 where pkid =' " # m # " ' ",总是报错,说语言错误,还有时说没有结束语句。我看不出来啊