search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Database update with modified datatable

Asked by Anonymous
15 years ago.

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();

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.