So I am updating a couple of tables. In the second table (Treatment) I need to get the Staff_Assignment value. This is an automatic incremented Primary Key. How can I extract that, and write it to the Treatment Table?


Code:
            rowsAffected = Staff_AssignmentTableAdapter.Insert(SelectedStaff)
            rowsAffected = TreatmentTableAdapter.Insert(Patient_No, Visit_No, Staff_Assignment, Treatment)