S
StevenVibert
I'm working with a SQL database that includes 2 tables; Employees and
EmergencyContacts. The Employees table has an EmployeeID primary key,
the EmergencyContacts has a EmployeeID foreign key. Each employee can
have n emergency contacts.
Using ADO.NET with C# I can easily display this parent/child
relationship using individual controls to display the Employee data and
a DataGrid to show the associated EmergencyContacts.
What I'd like to do, however is the following: Rather than present the
Emergency Contacts Information in a DataGrid, I'd like to show this
data on a seperate TabPage in individual controls. Since it's likely
that there will be more than one EmergencyContact per Employee, this
TabPage would have record navigation controls.
For the life of me I have been unable to get this to work. When my app
initially fills the Employee and EmergencyContact DataAdapters, the
EmergencyContact information for the first record is correct. However,
when I navigate to another employee record the emergency contact
information for the employee is not updated (the info displayed is the
first employee's).
I'm having a tough time wrapping my head around what I need to do to
get this working.
Any thoughts, suggestions, and comments would be greatly appreciated.
Thanks!
Steve
EmergencyContacts. The Employees table has an EmployeeID primary key,
the EmergencyContacts has a EmployeeID foreign key. Each employee can
have n emergency contacts.
Using ADO.NET with C# I can easily display this parent/child
relationship using individual controls to display the Employee data and
a DataGrid to show the associated EmergencyContacts.
What I'd like to do, however is the following: Rather than present the
Emergency Contacts Information in a DataGrid, I'd like to show this
data on a seperate TabPage in individual controls. Since it's likely
that there will be more than one EmergencyContact per Employee, this
TabPage would have record navigation controls.
For the life of me I have been unable to get this to work. When my app
initially fills the Employee and EmergencyContact DataAdapters, the
EmergencyContact information for the first record is correct. However,
when I navigate to another employee record the emergency contact
information for the employee is not updated (the info displayed is the
first employee's).
I'm having a tough time wrapping my head around what I need to do to
get this working.
Any thoughts, suggestions, and comments would be greatly appreciated.
Thanks!
Steve