16,553
社区成员
发帖
与我相关
我的任务
分享
Dim strsql_bw3 As String
strsql_bw3 = "select count(*) as total from tab_jdwt where nian='" & int_year & "' and yue='" & int_month & "' and wtbwdm='3'"
Dim cmd_bw3 As New OleDbCommand(strsql_bw3, conn)
conn.Open()
Dim dr_bw3 As OleDbDataReader = cmd_bw3.ExecuteReader()
dr_bw3.Read()
If 有记录 Then
lab_sjcs_3.Text = dr_bw3.Item("total")
ElseIf 没有记录 Then
lab_sjcs_3.Text = 0
End If
conn.Close()
' Always call Read before accessing data.
While reader.Read()
Console.WriteLine(reader.GetInt32(0) & ", " & reader.GetString(1))
End While