The binding source should be "end edited" before you send the DataTable to TableAdapter.
Normally following things should be checked, 1) Before you execute the TableAdapter "Update" method, check is there any data present in DataTable 2) Your TableAdapter's Update method is calling proper insert and update queries On Sun, Sep 27, 2009 at 7:59 AM, anubhav nidaria <[email protected]>wrote: > i hv an "employees" database containing "employee" table > > now i wrote d following code to add a new record in the table: > > > Private > Sub frm_process_Load(ByVal sender As System.Object, ByVal e > AsSystem.EventArgs) > Handles MyBase.Load > > Me.EmployeeTableAdapter.Fill(Me.EmployeesDataSet.employee) > > End > Sub > > Private Sub cmd_add_Click(ByVal sender As System.Object, ByVal e > AsSystem.EventArgs) > Handles cmd_add.Click > > Me.BindingContext(EmployeesDataSet, "employee").AddNew() > > End Sub > > Private Sub cmd_save_Click(ByVal sender As System.Object, ByVal e > AsSystem.EventArgs) > Handles cmd_save.Click > > EmployeeTableAdapter.Update( > Me.EmployeesDataSet.employee) > > End Subwhn i click "add" it adds a new record but whn i click "save" it > doesn't save the record-----this is the problem.....plz help >
