Now I know that is the problem as from a update buttons I cannot refrence the d Adapter. private Sql Data Adapter _data Adapter; private Data Set _data Set; private Data Table _data Table; and your constructor you need to intialize that // **** Constructor public Cust Trans() Now you need to intilize your adpatert // *** Setup Data Adapter with expicit INSERT, UPDATE, // DELETE "Template" Commands.private void Initialize Commands() // *** Bind parameters to appropriate columns.
Please note that the Grid only gets filled when the dates changes from the date picker. you need to declare your adapter out side your method like this // The Data Set, Data Adapter, and Data Table are members // so that we can access them from any member method.
More importantly the dataset also needs to be refrenced for the update commnad to work hi, the two lines are quite confusing: Data Set d Table = new Data Set(); d Adapter.
Update(d Table); you are creating new dataset and calling update of dataadapter, what it will update?
// Note: The params keyword lets you specify a method // parameter that takes an argument where the number // of arguments is variable.
private void Add Parms(Sql Command cmd, params string cols) Now use this method to update your record // **** Handle the UPDATE button click protected void btn Update_Click (object sender, System.