Review the code snippet before inserting it on your project.
Public Shared Sub AddRowsToTable(ByVal dr() As DataRow, ByVal dt As DataTable) Dim i As Integer Try For i = 0 To dr.Length - 1 dt.Rows.Add(dr(i).ItemArray) Next Catch ex As Exception MsgBox(ex.Message) End Try End Sub
With from Barcelona