Suppose you have this table structure
---------------| |--------------| | PERSON | | EMPLOYEE | |--------------| |--------------| |Id | |Id | |Name | |RegNo | |Address | |Departament | |Email | |Salary | |Telephone | |FK_Person | |--------------| |---------------
Then you have a screen that has controls that you can use to CRUD those tables, but this screen joins those two tables to make it seem that those two tables are only one entity.
I know I could use two separated datasets one for person and one for employee, add person first and then open the employee dataset for adding in two separate screen events, making the user save person first and then add and save employee. What I'm trying to do is a single screen that I can navigate records, edit, add, delete, update. So I wrote a query for a OleDbDataAdapter like this
SELECT *
FROM Person
INNER JOIN Employee
ON Person.Id = Employee.FK_Person
this way I filled the dataset, but I'm only able to navigate, not persist changes.
Note that this is using Microsoft Access.