Updating datarow

03 Apr

Generally we used Data Set for having the collection of Data.

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.

we will just focus on Concept and the code for this.

I will performe insert,delete and update operation on Data Set (Data Table) on Page_Load event. Step 3: Now we will update these changes to Database with the help of Update method of Sql Data Adapter object. Anything which is not clear to you, Please feel free to ask.

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.

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .

you can even use Stored Procedure or any thing you want but store result into Sql Data Adapter.

Now for the sake of the simplicity we are not concentrating on UI part.

It perform the appropriate operation(Insert or Update or Delete).

Row State value can be : More you can get about these State from MSDN. Step 1: We have a Data Base Helper Class which have a function which return a Sql Data Adapter object of our datacollection Here I am writing SQL Query inside this function.