C
Christopher Weaver
I've writtten the following (which compiles and runs). For some reason,
TaskRows is always empty.
DataRow[] TaskRows;
foreach(DataRow TaskRow in dsTaskActivities.Tables["Tasks"].Rows)
{
TaskRows = TaskRow.GetChildRows(relTaskActivities);
foreach(DataRow dr in TaskRows)
{
dsTaskActivities.Tables["Activity"].Rows.Add(dr);
}
}
I've confirmed that the DataRelation relTaskActivities in TaskActivities
works and that there is data there for it to grab; I've used this
DataRelation to fill a grid using the DA.Fill method. I'm attempting to use
GetChildRows only because I need to use DA.Fill(DataSet, int, int, string)
on the master table because there are too many records to make the download
time practicle over the web.
If anyone can tell me why GetChildRows isn't returning any rows or any other
way to accomplish the same task, I would really appreciated it. One person
suggested using a 'WHERE ... IN' query and I'm considering it, but it seems
like GetChildRows was created for this purpose.
TaskRows is always empty.
DataRow[] TaskRows;
foreach(DataRow TaskRow in dsTaskActivities.Tables["Tasks"].Rows)
{
TaskRows = TaskRow.GetChildRows(relTaskActivities);
foreach(DataRow dr in TaskRows)
{
dsTaskActivities.Tables["Activity"].Rows.Add(dr);
}
}
I've confirmed that the DataRelation relTaskActivities in TaskActivities
works and that there is data there for it to grab; I've used this
DataRelation to fill a grid using the DA.Fill method. I'm attempting to use
GetChildRows only because I need to use DA.Fill(DataSet, int, int, string)
on the master table because there are too many records to make the download
time practicle over the web.
If anyone can tell me why GetChildRows isn't returning any rows or any other
way to accomplish the same task, I would really appreciated it. One person
suggested using a 'WHERE ... IN' query and I'm considering it, but it seems
like GetChildRows was created for this purpose.