VB的实时错误‘-2147217904(80040e10)’至少一个参数没有被指定值 代码如下
PrivateSubForm_Load()CallGetData("select*fromhyglorderbyiddesc")EndSubFunctionGetData...
Private Sub Form_Load()
Call GetData("select * from hygl order by id desc")
End Sub
Function GetData(sql)
MSFlexGrid1.Clear
mycon.Open
Dim rs As New ADODB.Recordset
rs.Open sql, mycon, 1, 1
If rs.EOF Then
Else
Dim i As Integer
With MSFlexGrid1
i = 1
.Rows = 1
Do While Not rs.EOF
i = i + 1
.Rows = i·
.TextMatrix(i - 1, 1) = rs("ID")
.TextArray(0) = ""
.TextMatrix(i - 1, 2) = rs("cp")
.TextMatrix(i - 1, 3) = rs("fy")
.TextMatrix(i - 1, 4) = rs("kssj")
.TextMatrix(i - 1, 5) = rs("jzsj")
.TextArray(1) = "编号"
.TextArray(2) = "车牌"
.TextArray(3) = "费用"
.TextArray(4) = "开始时间"
.TextArray(5) = "截止时间"
.ColWidth(0) = 300
.ColWidth(1) = 600
.ColWidth(2) = 1200
.ColWidth(3) = 1200
.ColWidth(4) = 1200
.ColWidth(5) = 1200
rs.MoveNext
Loop
End With
rs.Close
End If
mycon.Close
End Function
哪位大哥帮帮忙,哪里错了啊 展开
Call GetData("select * from hygl order by id desc")
End Sub
Function GetData(sql)
MSFlexGrid1.Clear
mycon.Open
Dim rs As New ADODB.Recordset
rs.Open sql, mycon, 1, 1
If rs.EOF Then
Else
Dim i As Integer
With MSFlexGrid1
i = 1
.Rows = 1
Do While Not rs.EOF
i = i + 1
.Rows = i·
.TextMatrix(i - 1, 1) = rs("ID")
.TextArray(0) = ""
.TextMatrix(i - 1, 2) = rs("cp")
.TextMatrix(i - 1, 3) = rs("fy")
.TextMatrix(i - 1, 4) = rs("kssj")
.TextMatrix(i - 1, 5) = rs("jzsj")
.TextArray(1) = "编号"
.TextArray(2) = "车牌"
.TextArray(3) = "费用"
.TextArray(4) = "开始时间"
.TextArray(5) = "截止时间"
.ColWidth(0) = 300
.ColWidth(1) = 600
.ColWidth(2) = 1200
.ColWidth(3) = 1200
.ColWidth(4) = 1200
.ColWidth(5) = 1200
rs.MoveNext
Loop
End With
rs.Close
End If
mycon.Close
End Function
哪位大哥帮帮忙,哪里错了啊 展开
若以下回答无法解决问题,邀请你更新回答
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询