Let’s look into the code (Replace this code at “Save Data Set Changes to Database” section above.
Sql Command Builder command Builder = new Sql Command Builder(adp); adp.
If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.
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.
You can manipulate the collection directly to delete records.
However, if you want to send changes to the database or to another process, the dataset has to maintain change information for deleted rows.
So we need to provide Insert, Update and Delete query to Sql Data Adapter object. Update(ds);// This method executes the appropiate query according to the //Row State NOTE : Please make sure that you have a primary key in your table.
This becomes more easy with the help of Sql Command Builder. Now for the sake of the simplicity we are not concentrating on UI part.we will just focus on Concept and the code for this.If you have a Data Adapter control, then just reference this. However, Im receiving this error message in my client browser interface: "Object Reference not defined for an instance of an object. Null Reference Exception: Object Reference not defined for an instance of an object." My function is only this: public bool Update Data Set (Data Set DS) So, any good soul could help me to update a data base using a daaset with functions update from Oracle Data Adapter ? Fernanda Menks Fernanda, The reason it does not work is because the adapter variable is null, as it is not assigned to, only declared.Basically, you should create an instance of the Oracle Data Adapter and then configure it. NET/C# MVP] - firstname.lastname@example.org."Fernanda" Good afternoon, I have a function in a remote server which receives a dataset and makes (or at least should do) necessary updates.As Gordon Linoff pointed out your sql statement is incorrect.