11-08-21 10:01 AM
}
catch (Exception ex)
{
sErrorMsg = ex.Message;
bError = true;
}
collOut = mainDt;
--------------------------------------------------------------------------------------------
Further investigation in BP using MessageBox.Show between each line of code shows me that the problem arrises in the first "for" statement. I suspect BP's code engine does not recognize the COLLECTION.Columns.Count property but tries to find a field called Columns.Count in the input Collection/DataTable.
What can I do?
Answered! Go to Answer.
11-08-21 11:05 AM
11-08-21 10:59 AM
For Each c As DataColumn in c2.Columns
c1.Columns.Add(c.ColumnName, c.DataType)
Next
For r As Integer = 0 To c1.Rows.Count - 1
If r < c2.Rows.Count Then
For Each c As DataColumn in c2.Columns
c1.Rows(r)(c.ColumnName) = c2.Rows(r)(c.ColumnName)
Next
Else
Exit For
End If
Next
c3 = c1
11-08-21 11:05 AM
11-08-21 11:24 AM