dt1 = ds1.Tables(0) Dim dt2 As DataTable = ds2.Tables(0) da1 = New MySqlDataAdapter("select s_inventoryTab_name, s_inventoryTab_stockonhand,s_inventoryTab_jan,s_inventoryTab_feb from s_medicinetab where s_inventoryTab_year = '" & 2016 & "'", con) da1.Fill(ds1) For i As Integer = 0 To dt2.Rows.Count - 1 dt1.ImportRow(dt2.Rows(i)) Next
DataTable dtTarget = new DataTable(); dtTarget = dtSource.Clone(); DataRow[] rowsToCopy; rowsToCopy = dtSource.Select("key='" + matchString + "'"); foreach (DataRow temp in rowsToCopy) { dtTarget.ImportRow(temp); }
DataTable.Clone
DataTable.Copy
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)