J
J055
Hi
I have a relation and foreign key constraint set up on two DataTables within
a typed DataSet. I want to return the child rows from one of the tables,
e.g.
MyDataSet dataSet = primaryTbl.DataSet;
(MyDataSet.MyPrimaryRow[])primaryRow.GetChildRows(dataSet.Relations[0]);
I've tried a few different ways but I gets errors like null exceptions
because the dataSet is null.
What is the correct way of use relations when they have been setup in the
typed DataSet? Also I'm doing this to try and get a performance improvement
to replace this approach:
(MyDataSet.foreignRow[])foreignTbl.Select("ID = " + primaryRow.ID);
Can you tell me if this will help or am I barking up the wrong tree here?
Have I got to create DataView objects instead because you can't have indexes
on non primary key columns in a DataTable, etc, etc?
Hope this all makes sense.
Confused
Andrew
I have a relation and foreign key constraint set up on two DataTables within
a typed DataSet. I want to return the child rows from one of the tables,
e.g.
MyDataSet dataSet = primaryTbl.DataSet;
(MyDataSet.MyPrimaryRow[])primaryRow.GetChildRows(dataSet.Relations[0]);
I've tried a few different ways but I gets errors like null exceptions
because the dataSet is null.
What is the correct way of use relations when they have been setup in the
typed DataSet? Also I'm doing this to try and get a performance improvement
to replace this approach:
(MyDataSet.foreignRow[])foreignTbl.Select("ID = " + primaryRow.ID);
Can you tell me if this will help or am I barking up the wrong tree here?
Have I got to create DataView objects instead because you can't have indexes
on non primary key columns in a DataTable, etc, etc?
Hope this all makes sense.
Confused
Andrew