This Exception mainly comes when we are trying to copy a row from one DataTable to another Datatable.

Here is Problem:

Dim tempDS as Dataset For each temprow as DataRow in objDS1.Tables(0).select(”ID=’xyz’”)

tempDS.Tables(0).rows.add (temprow) Next row Instead ,do the following:

Dim tempDS as Dataset For each temprow as DataRow in objDS1.Tables(0).select(”ID=’xyz’”)

tempDS.Tables(0).ImportRow (temprow) Next row

Read More Articles