i'm working on a project and the only problem is that i want to sum a prticular column and put the out put on a label using sqlreader but instead of the value i get 'System.Data.Sq lClient.SqlData Reader' on the label
THE PROGRAM
i will really appreciate ur help
THE PROGRAM
Code:
SqlDataReader da = null;
SqlCommand A = new SqlCommand("Select sum(amount) from transactions where type_of_transaction like '%" + Search + "%'", conn2);
A.ExecuteNonQuery();
da = A.ExecuteReader();
da.Read();
sum.Text = da.ToString();
conn2.Close();
Comment