hi iam usin asp.net with c#
querry is returning zero value even though it is returning session value and data is present in data base
can you correct my code which helps me
SqlCommand cmdallltransactions = new SqlCommand("SELECT SUM(Amount) FROM AllTransactions WHERE TransDate BETWEEN '"+ txtfrom.Text +"' and '" + txtto.Text + "' and (TransCode <> 0) and BranchKey=" + Convert.ToInt32(Session["BranchKey"]) + " GROUP by BranchKey", con); con.Open(); txttotal.Text =Convert.ToString(Convert.ToInt64(cmdallltransactions.ExecuteScalar())); con.Close();
|