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
Bineesh Viswanath
NA
1k
777.6k
object ref while passing SqlDataReader into DataSet in c#
Aug 24 2017 3:12 AM
Hi Sir,
An error is coming while I passing SqlDataReader into DataSet.
Kindly go through the code given below and suggest a solution.
sqlRdr = sqlcmd.ExecuteReader();
while
(sqlRdr.Read())
{
dgvFeedBack.DataSource = sqlRdr;
}
if
(!sqlRdr.HasRows)
{
RadMessageBox.SetThemeName(
"Windows7"
);
RadMessageBox.Show(
"\nNo Records found between "
+ dtFromFeedback.Text +
" and "
+ dtToFeedback.Text,
"CollectPlus - Du Feedback"
, MessageBoxButtons.OK, RadMessageIcon.Exclamation);
dgvFeedBack.DataSource =
null
;
dgvFeedBack.Rows.Clear();
btnExportData.Enabled =
false
;
}
lblTotalNoOfActions.Text = dgvFeedBack.Rows.Count.ToString();
DsAllFeedback.Tables.Add().Load(sqlRdr);
sqlCon.Close();
Reply
Answers (
3
)
Setup Solr 6.6.0 on windows 10 operating system
how to undo the datagridview combobox column in c# winapp