VB6.0 实时错误“3704”,对象关闭时,不允许操作。
PrivateSubcmdInquire_Click()DimtxtsqlAsStringDimMsgTextAsStringDimdd(4)AsBooleanDimmr...
Private Sub cmdInquire_Click()
Dim txtsql As String
Dim MsgText As String
Dim dd(4) As Boolean
Dim mrc As New ADODB.Recordset
txtsql = "select * from cx_view where "
txtsql = txtsql & " order by CSn "
conn.Execute (txtsql)
With MSFlexGrid1
.Rows = 2
.CellAlignment = 4
.TextMatrix(1, 0) = "工号"
.TextMatrix(1, 1) = "部门"
.TextMatrix(1, 2) = "姓名"
.TextMatrix(1, 3) = "岗位"
.TextMatrix(1, 4) = "联系电话"
.TextMatrix(1, 5) = "性别"
.TextMatrix(1, 6) = "运营商"
.TextMatrix(1, 7) = "使用时间"
.TextMatrix(1, 8) = "电脑编号"
.TextMatrix(1, 9) = "品牌"
.TextMatrix(1, 10) = "型号"
.TextMatrix(1, 11) = "出厂编号"
.TextMatrix(1, 12) = "MAC地址"
.TextMatrix(1, 13) = "IP地址"
.TextMatrix(1, 14) = "联网信息"
.TextMatrix(1, 15) = "验货人"
.TextMatrix(1, 16) = "验货时间"
.TextMatrix(1, 17) = "维修信息"
Do While Not mrc.EOF
.Rows = .Rows + 1
.CellAlignment = 4
.TextMatrix(.Rows - 1, 0) = mrc.Fields(0)
.TextMatrix(.Rows - 1, 1) = mrc.Fields(1)
.TextMatrix(.Rows - 1, 2) = mrc.Fields(2)
.TextMatrix(.Rows - 1, 3) = mrc.Fields(3)
.TextMatrix(.Rows - 1, 4) = mrc.Fields(4)
.TextMatrix(.Rows - 1, 5) = mrc.Fields(5)
.TextMatrix(.Rows - 1, 6) = mrc.Fields(6)
.TextMatrix(.Rows - 1, 7) = Format(mrc.Fields(7), "yyyy-mm-dd")
.TextMatrix(.Rows - 1, 8) = mrc.Fields(8)
.TextMatrix(.Rows - 1, 9) = mrc.Fields(9)
.TextMatrix(.Rows - 1, 10) = mrc.Fields(10)
.TextMatrix(.Rows - 1, 11) = mrc.Fields(11)
.TextMatrix(.Rows - 1, 12) = mrc.Fields(12)
.TextMatrix(.Rows - 1, 13) = mrc.Fields(13)
.TextMatrix(.Rows - 1, 14) = mrc.Fields(14)
.TextMatrix(.Rows - 1, 15) = mrc.Fields(15)
.TextMatrix(.Rows - 1, 16) = Format(mrc.Fields(16), "yyyy-mm-dd")
.TextMatrix(.Rows - 1, 17) = mrc.Fields(17)
mrc.MoveNext
Loop
End With
mrc.Close
End Sub 展开
Dim txtsql As String
Dim MsgText As String
Dim dd(4) As Boolean
Dim mrc As New ADODB.Recordset
txtsql = "select * from cx_view where "
txtsql = txtsql & " order by CSn "
conn.Execute (txtsql)
With MSFlexGrid1
.Rows = 2
.CellAlignment = 4
.TextMatrix(1, 0) = "工号"
.TextMatrix(1, 1) = "部门"
.TextMatrix(1, 2) = "姓名"
.TextMatrix(1, 3) = "岗位"
.TextMatrix(1, 4) = "联系电话"
.TextMatrix(1, 5) = "性别"
.TextMatrix(1, 6) = "运营商"
.TextMatrix(1, 7) = "使用时间"
.TextMatrix(1, 8) = "电脑编号"
.TextMatrix(1, 9) = "品牌"
.TextMatrix(1, 10) = "型号"
.TextMatrix(1, 11) = "出厂编号"
.TextMatrix(1, 12) = "MAC地址"
.TextMatrix(1, 13) = "IP地址"
.TextMatrix(1, 14) = "联网信息"
.TextMatrix(1, 15) = "验货人"
.TextMatrix(1, 16) = "验货时间"
.TextMatrix(1, 17) = "维修信息"
Do While Not mrc.EOF
.Rows = .Rows + 1
.CellAlignment = 4
.TextMatrix(.Rows - 1, 0) = mrc.Fields(0)
.TextMatrix(.Rows - 1, 1) = mrc.Fields(1)
.TextMatrix(.Rows - 1, 2) = mrc.Fields(2)
.TextMatrix(.Rows - 1, 3) = mrc.Fields(3)
.TextMatrix(.Rows - 1, 4) = mrc.Fields(4)
.TextMatrix(.Rows - 1, 5) = mrc.Fields(5)
.TextMatrix(.Rows - 1, 6) = mrc.Fields(6)
.TextMatrix(.Rows - 1, 7) = Format(mrc.Fields(7), "yyyy-mm-dd")
.TextMatrix(.Rows - 1, 8) = mrc.Fields(8)
.TextMatrix(.Rows - 1, 9) = mrc.Fields(9)
.TextMatrix(.Rows - 1, 10) = mrc.Fields(10)
.TextMatrix(.Rows - 1, 11) = mrc.Fields(11)
.TextMatrix(.Rows - 1, 12) = mrc.Fields(12)
.TextMatrix(.Rows - 1, 13) = mrc.Fields(13)
.TextMatrix(.Rows - 1, 14) = mrc.Fields(14)
.TextMatrix(.Rows - 1, 15) = mrc.Fields(15)
.TextMatrix(.Rows - 1, 16) = Format(mrc.Fields(16), "yyyy-mm-dd")
.TextMatrix(.Rows - 1, 17) = mrc.Fields(17)
mrc.MoveNext
Loop
End With
mrc.Close
End Sub 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询