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
|
|
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Marimuthu ArigovindasamyPosted Jun 15, 2010, 1:19 AM
Can u pls assign ur query into string variable and get the output of variable and run it in ur SQL window for the SQL query output.
string query = "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"
There may be a problem with DB column timestamp issue (For TransDate column).