Hi All's, really need your's help regarding this issues. I have one Access Database where the Table = ST , Column =DATE(Datetime),CLICK(Integer). I want to get the total value form CLICK column by Month.I'm already tried with this but cannot :
Dim cmd As OleDbCommand = New OleDbCommand("SELECT * FROM ST WHERE [DT]=@DATE ", con)
cmd.Parameters.Add(New OleDbParameter("@Date", OleDbType.Date)).Value = Date.Now.Month
Dim totalSum As Integer
con.Open()
Dim sdr As OleDbDataReader = cmd.ExecuteReader()
For i As Integer = 0 To sdr.Item("CLICK").Rows.Count - 1
totalSum += sdr.Item("CLICK").Rows(i).Item("CLICK")
Next
TextBox2.Text = totalSum.ToString
con.Close()
Can anyone show me the way ?..tq