DataView

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello
I am editing serveral textboxes that are bound to a DataView, But I don't know how to updatd my Tables with the changed information
thanks for helping me.
 
Once you edit the controls which are bound to the view, the underlying data
in the datatable from which the view is based will be changed just like you
were doing it directly to the table. After your changes are ready , just
call dataAdapter.Update(DataSet, "datatable").

Just to show you what's happening...go ahead and edit some records (I'm
assuming you are using a BindingContext for navigation since you are using
Textboxes) and then on your update button place Debug.Assert(Not
myDataSet.HasChanges). You'll should see a big ugly dialog box telling you
the assertion failed (proving that the changes were passed through the view
and reflected in the table/DataSet).

Another thing you might want to do (these last two are just for learning's
sake)..create a DataTable and myDataTable = DataSet.GetChanges();

You'll now have a datatable with only the rows that have changes..and if
your bindings are set correctly, you'll have a datatable with
updates/inserts/deletes etc.

HTH,

Bill
EDYRIHE said:
Hello.
I am editing serveral textboxes that are bound to a DataView, But I don't
know how to updatd my Tables with the changed information.
 
Back
Top