Home Unanswered Active Tags New Question

Database update with modified datatable

Hi,

I want to ask that how can we update the database based upon the datatable which is modified. Currently I am using the following code in set Events function. I am getting updated Dataset with no errors in code but my Database is not getting updated.

DataSet dsnew = new DataSet();
table.TableName = "NewCalendar";
SqlDataAdapter adpt1 = new SqlDataAdapter(strcmd, cn1);
bldr = new SqlCommandBuilder(adpt1);
// adpt1.Fill(ds, "Calander");
adpt1.Fill(dsnew, "Calendar");
dsnew.Tables.Remove("Calendar");
dsnew.Tables.Add(table.Copy());
//bldr.GetInsertCommand();
adpt1.Update(dsnew, "NewCalendar");
dsnew.AcceptChanges();

Asked by Anonymous 2 years ago.
Replies
No reply yet.
New Reply
This reply is
Your name (optional):

DayPilot for ASP.NET WebForms, DayPilot for ASP.NET MVC, DayPilot for Java