I presume you mean a seperate table to the one on which your view is based. The following will do this assuming the 2nd table is the same structure as the one which the view is based upon.
Code:
'dv=Your Dataview, newdt=Your New Table
For Each drv As DataRowView In dv
Dim dr As DataRow = drv.Row
newdt.Rows.Add(dr.ItemArray)
Next
If your tables are of a different structure, you will have to pick the values from the dr datarow, create a new row for your new datatable and assign the values, before finally adding the new row to the table.
Code:
dim newrow as datarow
newrow = newdt.newrow
newrow("Field1")="TEXT"
newrow("Field2")=20
newdt.rows.add(newrow)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.