DataSet problem.

  • Thread starter Thread starter Ilya Tumanov [MS]
  • Start date Start date
I

Ilya Tumanov [MS]

It's very easy to accomplish.

For each table enumerate relations and fetch child row(s) using
DataRow.GetChildRows().
Now you can use ImportRow to add row(s) to the child table in a new DataSet.

By the way, may I ask why do you need a DataSet with a single row?
Perhaps, it would make more sense to use DataView to filter out rows you do
not need?

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
 
Hi I have a dataset, say Dataset1, with 2 tables, say Table1 and Table2.
Table2 is child of Table1. so that each row of Table1 will have
corresponding connection with table2. E.g: The structure is like this.

Table1:

Row1: Column1 Column2-----> Table2
Row1
Row2......

Row2: Column1 Column2-----> Table2
Row1
Row2......


So there is a Foreign Key constrain between table1 and table2.

Now, I have another dataset, say Dataset2 with the same structure as that
Dataset1, but will have only one row at a time. So I want to copy the full
row, from Dataset1, along with the child table, Table2, rows. Copy and Merge
functions are not present in Compact Framework. I also made use of ImportRow
function, but it only copies "Column1" and not the child rows. I am unable
to copy the child rows. Could you suggest something?

Please help. Its really very urgent.

Thanks a lot.
Amit Patankar.
 
Back
Top