Frederick Deane
Member
I am creating an Application Database for my company and I have a main form setup with fields for the parent table and tabs for the child tables. I have the dataset loaded with my 3 tables but whenever I insert new data into the form, the main table alone gets updated and the data is lost from the child forms. I have created relationships between the forms based on the primary key of the main table (this is an auto increment number). I am using SQLServer 2008 and VS2010 Ultimate. It appears that the TableAdapterManager is not updating the necessary tables with the primary key of the main table. I even set an addnew event on the other binding sources of the other tables in order to commit the main table before any of the others but still no luck. Any help would be appreciated!
This is the code where i try to save
This is the code where i try to save
Private Sub EmpDataBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EmpDataBindingNavigatorSaveItem.Click Me.Validate() Me.EmpExpBindingSource.EndEdit() Me.EmpRefBindingSource.EndEdit() Me.EmpSchBindingSource.EndEdit() Me.EmpDataBindingSource.EndEdit() Me.TableAdapterManager.UpdateAll(Me.CensusApplicationDataSet) End Sub