I am working on a program where I am retrieving data from an Access
database through one common dataset. I have already put the database
connection component on the form as well as the two data adapters.
Here is where I am having problems.
I double click on the .xsd file and then go to the schema menu and
select add|new relationship. My table names are Employee and Payroll.
Employee ID is a primary key in the Employee table and a foreign key
in the Payroll table. I need to define a DataRelation link with
Employee ID. The problem is that when the parent table is set to
Employee and the child table is set to Payroll, the "OK" button in the
xml editor
becomes greyed out.
If I change the child table to employee, then I can click OK. I did
this, but now I have the relation line drawn on the left side of the
employee table coming from the primary key. When I go to debug, I have
a list of 5 build errors. In the programming book I am working from,
the example shows selecting the second table for the child table, so it
would seem that I am following the correct steps, but something isn't
working right.
Questions:
Why is the "OK" button greyed out when I select payroll as the child
table?
How do I fix the existing relation line?