Updating dataset in c

20-Jun-2019 11:04

So Let’s start with post with a very often situation in our coding life.Generally we used Data Set for having the collection of Data.If Update is called and the appropriate command does not exist for a particular update (for example, no Delete Command for deleted rows), an exception will be thrown.Command parameters can be used to specify input and output values for an SQL statement or stored procedure for each modified row in a Data Set.

Sql Command Builder command Builder = new Sql Command Builder(adp); adp. Now we use this Data Set as a Data Source of any of the Data Control like; Grid View, List View etc for showing this Data to User.Now sometime we have a requirement like, some rows of that Data Set (having Data Table) may get Updated with new values and some may have been Deleted or there may be another possibility of Insertion of new row in that table.Now what we want is, this modified Data Set should Get stored in the database.

So Here I am trying to show you some of the easiest way to accomplish this.For more information, see Automatically Generated Commands.