Do While Not mrc.EOF调试报错 求教求教
PublicSubShowData()DimjAsIntegerDimiAsIntegerSetmrc=ExecuteSQL(txtSQL,MsgText)Withmsg...
Public Sub ShowData()
Dim j As Integer
Dim i As Integer
Set mrc = ExecuteSQL(txtSQL, MsgText)
With msgList
.Rows = 1
Do While Not mrc.EOF
.Rows = .Rows + 1
For i = 1 To mrc.Fields.Count
Select Case mrc.Fields(i - 1).Type
Case adDBDate
.TextMatrix(.Rows - 1, i) = Format(mrc.Fields(i - 1) & "", "yyyy-mm-dd")
Case Else
.TextMatrix(.Rows - 1, i) = mrc.Fields(i - 1) & ""
End Select
Next i
mrc.MoveNext
Loop
End With
mrc.Close
End Sub 展开
Dim j As Integer
Dim i As Integer
Set mrc = ExecuteSQL(txtSQL, MsgText)
With msgList
.Rows = 1
Do While Not mrc.EOF
.Rows = .Rows + 1
For i = 1 To mrc.Fields.Count
Select Case mrc.Fields(i - 1).Type
Case adDBDate
.TextMatrix(.Rows - 1, i) = Format(mrc.Fields(i - 1) & "", "yyyy-mm-dd")
Case Else
.TextMatrix(.Rows - 1, i) = mrc.Fields(i - 1) & ""
End Select
Next i
mrc.MoveNext
Loop
End With
mrc.Close
End Sub 展开
展开全部
公共子ShowData()
昏暗的j为整数
昏暗的我为整数
ExecuteSQL(txtSQL所设定MsgText =),
与msgList
.Rows = 1
虽然不做mrc.EOF
.Rows = .Rows + 1
因为我= 1到mrc.Fields.Count
所选择案例。字段(我- 1).Type
案例adDBDate
.TextMatrix(.Rows - 1,我)=格式(mrc地址字段(我- 1)和”、“yyyy-mm-dd”)
其他情况
.TextMatrix(.Rows - 1,我)= mrc地址字段(我- 1)和"
最终选择
接下来我
mrc.MoveNext
环
结束
mrc.Close
替补结束
昏暗的j为整数
昏暗的我为整数
ExecuteSQL(txtSQL所设定MsgText =),
与msgList
.Rows = 1
虽然不做mrc.EOF
.Rows = .Rows + 1
因为我= 1到mrc.Fields.Count
所选择案例。字段(我- 1).Type
案例adDBDate
.TextMatrix(.Rows - 1,我)=格式(mrc地址字段(我- 1)和”、“yyyy-mm-dd”)
其他情况
.TextMatrix(.Rows - 1,我)= mrc地址字段(我- 1)和"
最终选择
接下来我
mrc.MoveNext
环
结束
mrc.Close
替补结束
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询