D
Daniel
What's wrong with this code?
1 Dim parentRow, childRow as DataRow
2
3 For i = 0 To mainDataTable.Rows.Count - 1
4 parentRow = mainDataTable.Rows(i)
5 childRow = parentRow.GetChildRows("DataRelation")
6 mainDataTable.Rows(i).Item("Column1") = childRow.Item("Column1")
7 next i
mainDataTable is a plain old DataTable already instantiated.
DataRelation is the name of a valid DataRelation object in the DataSet
that joins these two tables.
I get this error at line 5:
"Value of type '1-dimensional array of System.Data.DataRow' cannot be
converted to 'System.Data.DataRow'.
What conversion is it talking about? I'm loading a DataRow object with
a DataRow object!!!
Any help is greatly appreciated,
Daniel
1 Dim parentRow, childRow as DataRow
2
3 For i = 0 To mainDataTable.Rows.Count - 1
4 parentRow = mainDataTable.Rows(i)
5 childRow = parentRow.GetChildRows("DataRelation")
6 mainDataTable.Rows(i).Item("Column1") = childRow.Item("Column1")
7 next i
mainDataTable is a plain old DataTable already instantiated.
DataRelation is the name of a valid DataRelation object in the DataSet
that joins these two tables.
I get this error at line 5:
"Value of type '1-dimensional array of System.Data.DataRow' cannot be
converted to 'System.Data.DataRow'.
What conversion is it talking about? I'm loading a DataRow object with
a DataRow object!!!
Any help is greatly appreciated,
Daniel