title: How to update database using DataRow?
body: <p>First I have created both the DataSet and MySQLDataAdapter in global. Then in Form_Load event, I query all of my tables like this.</p>
  
  <pre><code>        dS = New DataSet
          dA = New MySqlDataAdapter(myCommand)
          Using sqlConn As New MySqlConnection(connStr)
              myCommand = New MySqlCommand("Select ID, DevCompanyName from developer_name_table; Select ID, DevType from development_type_table; Select ID, Mukim from mukim_table; Select ID, Daerah from daerah_table; Select ID, Negeri from negeri_table; Select * from project_record ORDER BY FloatNo desc limit 1", sqlConn)
              sqlConn.Open()
              MsgBox("Connection open.")
              Dim myCB As New MySqlCommandBuilder(dA)
  
              dA.SelectCommand = myCommand
              dA.UpdateCommand = myCB.GetUpdateCommand
              dA.InsertCommand = myCB.GetInsertCommand
              dA.DeleteCommand = myCB.GetDeleteCommand
  
              dA.Fill(dS)
              dA.FillSchema(dS, SchemaType.Source)
              dS.Tables(0).TableName = "developer_name_table"
              dS.Tables(1).TableName = "development_type_table"
              dS.Tables(2).TableName = "mukim_table"
              dS.Tables(3).TableName = "daerah_table"
              dS.Tables(4).TableName = "negeri_table"
              dS.Tables(5).TableName = "project_record"
          End Using
  </code></pre>
  
  <p>Everything is working fine until I try to add new record into the database like this. The add record code below is under a button click event. First I check if record exits, then I add a new row like this.</p>
  
  <pre><code>        For Each r As DataRow In dS.Tables("project_record").Rows()
              If r.Item("FloatNo") = TextBox1.Text.Trim() Then
                  MsgBox("Project exist. Please recheck.")
                  Exit Sub
              End If
          Next
          SecurityAdd() 'This is just to fill None if field are empty.
          Dim row = dS.Tables("project_record").NewRow()
          row.Item("FloatNo") = TextBox1.Text.Trim()
          row.Item("DevCompanyName") = ComboBox1.Text.Trim()
          row.Item("DevType") = ComboBox2.Text.Trim()
          row.Item("LotPt") = TextBox2.Text.Trim()
          row.Item("Mukim") = ComboBox3.Text.Trim()
          row.Item("Daerah") = ComboBox4.Text.Trim()
          row.Item("Negeri") = ComboBox5.Text.Trim()
          row.Item("TempReference") = RichTextBox1.Text.Trim()
          row.Item("PermanentNo") = 0
          row.Item("QuotationNo") = 0
          row.Item("InvoiceNo") = 0
          row.Item("Staff") = loggedUser.ToString() 'Just user ID.
          dS.Tables("project_record").Rows.Add(row)
          dA.Update(dS, "project_record")
  </code></pre>
  
  <p>After the update, I am sure that the DataSet is updated because the second time I click on add record, the messagebox told me that the record existed. But when I check in my database, there are no new record? What am I doing wrong here?</p>