Want to build the ChatGPT based Apps? Start here
Become a member
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
C# Corner Home
Technologies
Monthly Leaders
ASK A QUESTION
Forum guidelines
Bineesh Viswanath
1.3k
1k
731.5k
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