private void btnSave_Click(object sender, EventArgs e) { DataRow row = this.dsPolicyNotes.Tables[0].NewRow(); row["PolID"] = this.PolID; row["Note"] = this.rtbNotes.Text; row["edate"] = DateTime.Now; this.dsPolicyNotes.Tables[0].Rows.Add(row); // Now proceed to call the update method in the biz object this.oPolicyNotesBiz.UpdateDataSet(dsPolicyNotes); }Here is the code in my Business layer :
public void UpdateDataSet(DataSet ds) { // Here maybe I can put someloig this.oDA.UpdateDataSet(ds); }And here is my code in my DataAccess layer that is not updating in
public void UpdateDataSet(DataSet ds) { DataSet dirtyDS = ds.GetChanges(); //Take action. ds.AcceptChanges(); SqlConnection con1 = new SqlConnection(this.connectionstring); con1.Open(); SqlDataAdapter sqlAdapter1 = new SqlDataAdapter(); sqlAdapter1.Update(ds,"PolicyNotes"); con1.Close(); }The Update is not working an nothing is inserted in Sql server.