Hii
I am attaching the command
SqlCommand cmd = new SqlCommand("select SUM(cast(UserIncomeDetail_Amount as int)) as amount from ft_UserIncomeDetail where User_Uniq='Harish'", con);
con.Open();
sda=cmd.ExecuteReader();
if (sda != null)
{
ViewBag.income = sda["amount"];
}
error-
System.InvalidOperationException: 'Invalid attempt to read when no data is present.'
please the fix issue
Ruchi SharavatPosted Oct 11, 2018, 1:46 AM
Abhishek MishraPosted Oct 11, 2018, 1:34 AM
Laxmi KattiPosted Oct 10, 2018, 11:41 PM