ComponentOne ADO.NET DataExtender
ADO.NET DataExtender Task-Based Help / Committing Changes
In This Topic
    Committing Changes
    In This Topic

    To commit changes to the server, complete the following steps:

    1. Add a Button control to your Windows form.
    2. Define some C1DataView objects for the C1DataViewSet component on the form.
    3. Add the following code:

      To write code in Visual Basic

      Visual Basic
      Copy Code
      Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
         C1DataViewSet1.Update()
      End Sub
      

      To write code in C#

      C#
      Copy Code
      private void button1_Click(object sender, EventArgs e)
      {
          C1DataViewSet1.Update();
      }
      

    The Update method automatically determines the correct order in which rows should be committed to the server. It also refreshes client row columns with new values generated on the server, including the cases of server generated autoincrement columns in conjunction with master-detail relationships between tables.

    See Also