views:

23

answers:

0

On the back end I am using XML files, xsd schemas a DataSet(dsThingPrograms) and DataTables. I have a parent ->child table relationship defined through the DataSet designer as such:

things[RFID(pkey), name]
programs[ID(pkey/autogen), name, path, thing_RFID(FK references things->RFID)]

In my code I have:

dsThingPrograms.things.AddthingsRow("lala", "00ffe4");
dsThingPrograms.things.WriteXml("path\to\things.xml", System.Data.XmlWriteMode.WriteSchema);

which works fine. However the problem comes when I try to add a row to the Programs table. When I do:

dsThingPrograms.programs.AddprogramsRow("someprog", "some\path", <???>);

VS wants me to add a dsThingPrograms.thingsRow parentthingsRowByFK_things_programs where the <???> is. I've tried a bunch of things but I could not satisfy that requirement and can't even get the code to compile. What is supposed to go in there to satisfy the FK property?