Add current row to a datatable from a foreach loop

Can someone help me to solve this I tried to current row from a foreach loop to a data table, and it showed this error?

a few details we cannot derive from screenshot

  • is DTMINOR correct initilaized, by CloneSourceDT.Clone, Build Data Table…

we assume that a datarow from another is to add to DTMINOR

  • in such case ArrayRow and CurrentRow.ItemArray is to use instead of the datarow field

Hey @sarath_babu,

Did you defined the structure of the DTMINOR, if not kindly define the structure using the below methods.

A. BuildDatatable
B. Clone Datatable


1 Like

Thank you. It worked !!!

Perfect. So may we ask you to close the topic? Thanks

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.