Committing changes to dataset.

Well I currently have multiple forms. On one from I make changes to the dataset and access that data later but on the next form the data is back to its original value. Not sure if i am really saving the changes correctly.

I have tried .beginEdit() - .endEdit(), .AcceptChanges(), .Update() to attempt to save the changes.

I am starting to think that I may not be saving the changes correctly because if the changes were saved accessing those fields in teh database should yeild the new result.

So some help/thoughts would be appreciated.


Answer this question

Committing changes to dataset.

  • settinghead

    data source update mode

    Not sure what that is what i did was on the first form made the field i wanted a textbox in the datasource view and dragged it onto the form. on the next form I find the field i want dataset.datatable.findbyprimarykey(key) and then try to diplay the valu in the appropriate field, but the value i entered on the text box in the previous form isnt getting saved to the dataset.

    also one of the fields i want to do a calculation.
    this minus that save here... but the value wont save.

  • Dreamwinter

    Are you using data binding If so, which data source update mode you’re using



  • mol233

    May be it's not supposed to update anything, but I could not say without your code. Please open code generated by designers and study how it works. Most likely you're just setting textbox.Text to value from DataSet which is one way only and would never update DataSet. You either have to do it in code or use data binding.



  • DeBiese

    could you or someone point me to a well coded easy to understand exapmle

  • Iyana

  • Committing changes to dataset.