TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Harish Batchu
NA
255
69k
I am getting an error when reading data from sqldatareader
Oct 10 2018 9:55 PM
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
Reply
Answers (
3
)
In MVC without using scafflodling how to perform ?
how get function return values and use values javascript mvc