I had a problem on displaying count sql in vb. Anyone would help me? I had google about this, and I had to use executereader but I don't know how to use it
Dim dso1 As Label = CType(e.Item.FindControl("dso1"), Label)
If Not IsNothing(dso1) Then
Dim name As String
name = dr.Item("alert_id")
If (name = "DSO") Then
strSQL = "SELECT COUNT(alert_value) AS alert1 "
strSQL = strSQL & "FROM company_alert a "
strSQL = strSQL & "LEFT JOIN ref_alert_parameter b ON a.alert_id = b.alert_id "
strSQL = strSQL & "WHERE b.alert_id = 'DSO' And alert_value >= para1 "
'dso1.Text = dr.Item("alert1")
dso1.Text = e.Item.DataItem("alert1").ToString
dso1.BackColor = Drawing.Color.Red