this is my first visit to the forum
i need a help to change this code to update my database becaus this code make new record but i need to update exist record
i need a help to change this code to update my database becaus this code make new record but i need to update exist record
VB.NET:
Private Sub Button3_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
'save record
Dim newRecord As DataRow = Me.DataSet61.PHONEBOOK.NewRow
newRecord("PAYROLL") = Me.TextBox11.Text
newRecord("NAME") = Me.TextBox10.Text
newRecord("SECTOR") = Me.TextBox9.Text
newRecord("PHONE") = Me.TextBox8.Text
newRecord("EMAIL") = Me.TextBox7.Text
newRecord("LOCATION") = Me.TextBox3.Text
newRecord("DEPARTMENT") = Me.TextBox4.Text
Me.DataSet61.PHONEBOOK.Rows.Add(newRecord)
Me.OleDbDataAdapter1.Update(Me.DataSet61)
End Sub