注册 登录
编程论坛 VB.NET论坛

求助~在线等 急 麻烦各位大虾解释下代码意思

发布于 2008-05-30 18:46, 787 次点击
Private Sub Label5_Click()
Dim rs As ADODB.Recordset
Dim strQuery As String
Dim counter, counter1 As Integer
Set Conn = New ADODB.Connection
strDSN = "DSN=jx"
strQuery = "select * from axs"
Conn.Open strDSN
Set rs = Conn.Execute(strQuery)
Do
    If 0 <= y(DTPicker1, rs("xsrq")) And 0 <= y(rs("xsrq"), DTPicker2) Then
      counter = counter + rs.Fields("xssl").Value
      counter1 = counter1 + rs.Fields("hj").Value
      End If
            rs.MoveNext
Loop Until rs.EOF
Text1.Text = counter
Text2 = counter1
End Sub
0 回复
1