Hi there,
i'm working on a project in which i'm creating, editing and deleting customer records from a MS access db. I'm using vb.net 2003.
As with creating and deleting records i dont have any probelms. the problems arise when i come to update the data base if i edit any details. when i debugged it it showed the changes but not in the database. below is the code i used :
Private Sub cmdSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSave.Click
MsgBox("Do you want to save to database?", MsgBoxStyle.YesNo)
If MsgBoxResult.Yes Then
Dim custrow As DataSet1.CustomerRow
custrow = DataSet11.Customer.FindByCust_id(lblCustNo.Text)
custrow.BeginEdit()
custrow.Cust_Address = txtAdd.Text
custrow.Cust_email = txtEmail.Text
'custrow.Cust_id = lblCustNo.Text
custrow.Cust_name = txtName.Text
custrow.Cust_Sname = txtSname.Text
custrow.Cust_Tel = txtTel.Text
custrow.EndEdit()
custrow.AcceptChanges()
Me.oledb_cust_edit.Update(Me.DataSet11)
Me.OleDbConnection1.Close()
End If
Me.oledb_cust_edit.Fill(DataSet11)
interfaces.form2.Show()
interfaces.form4.Hide()
End Sub
it's not giving me any errors. any help please very much appreciated
thank you very much
Luke