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.
Please help, i am stuck
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, i am stuck