PJ MartinsRank #2,548 · 548 reputationPosted Jun 17, 2010, 7:31 AM EDT
0
your date limiter does not include the from and to date, try changing it to:
((TransDate >= @FromDate )and (TransDate <= @ToDate))
or
(TransDate between @FromDate and @ToDate)
charan sekhar92 reputationPosted Jun 20, 2010, 10:05 PM EDT
0
iam performing execute operation also you can seee
tot = Convert.ToDecimal(cmdallltransactions.ExecuteScalar()); txttotal.Text = tot.ToString(); con.Close();
0
Sam HobbsRank #107 · 20.5K reputationPosted Jun 20, 2010, 11:14 PM EDT
0
Thank you, I did not see that.
If it were me, I would determine what is returnd by cmdallltransactions.ExecuteScalar()). When you have multiple things being done in one line, it helps to split things up so you can determine what is happening.
Also, I don't see the code using a try/catch blcok. Before asking for help in a forum, try using a try/catch block to catch problems whenever the code you need help with that can result in an exception being thrown.
PJ MartinsRank #2,548 · 548 reputationPosted Jun 17, 2010, 7:31 AM EDT
((TransDate >= @FromDate )and (TransDate <= @ToDate))
or
(TransDate between @FromDate and @ToDate)
charan sekhar92 reputationPosted Jun 19, 2010, 4:02 AM EDT
Sam HobbsRank #107 · 20.5K reputationPosted Jun 20, 2010, 1:53 AM EDT
charan sekhar92 reputationPosted Jun 20, 2010, 10:05 PM EDT
iam performing execute operation also you can seee
tot = Convert.ToDecimal(cmdallltransactions.ExecuteScalar());
txttotal.Text = tot.ToString();
con.Close();
Sam HobbsRank #107 · 20.5K reputationPosted Jun 20, 2010, 11:14 PM EDT
If it were me, I would determine what is returnd by cmdallltransactions.ExecuteScalar()). When you have multiple things being done in one line, it helps to split things up so you can determine what is happening.
Also, I don't see the code using a try/catch blcok. Before asking for help in a forum, try using a try/catch block to catch problems whenever the code you need help with that can result in an exception being thrown.