Saving Data from Related Data Tables (Hierarchical Update)

So I am looking to have One Parent-One Child in details view. The parent key is autoincrement. so when i click add new i get the parent key -1, which is correct, but get nothing in the child fields. I have it working where the child is a datagrid view, but I don't want to use a data grid view, I want to use detail controls. It will be basically a one to one relationship. So say in northwind, it would be one customer can have 0 or 1 orders, just as an example.

Any help
 
So I need to update two tables from one form. The first table is the main table, the second has the id of the main table in it.

Table One

flightcard_id
name
revision
runtime
et

Table Two
system_setup_id
flightcard_id - the id from the first table
position
tilt
etc

Table two i have in details view, not DGV. They are combo boxes for a selection.

So when I create a new record, i need to save both tables. How can I do this, i tried several different things.

VB.NET:
    Private Sub FlightcardBindingNavigatorSaveItem_Click(sender As System.Object, e As System.EventArgs) Handles FlightcardBindingNavigatorSaveItem.Click
        Me.Validate()
        Me.System_setupBindingSource.EndEdit()
        Me.FlightcardBindingSource.EndEdit()
        Me.TableAdapterManager.UpdateAll(Me.FlightTestApp2DataSet)

        System_setupTableAdapter.Insert(Me.ComboBox1.SelectedValue, Me.ComboBox2.SelectedValue, vbNull, vbNull, vbNull, vbNull, vbNull, vbNull, vbNull, vbNull, vbNull, vbNull, vbNull, DirectCast(DirectCast(Me.FlightcardBindingSource.Current, System.Data.DataRowView).Row, Flight_Test_App.FlightTestApp2DataSet.flightcardRow).flightcard_id)

    End Sub

Please Help
 
Back
Top