L
localhost
I have two DataSets and need to get DataRows from one DataTable into
another. Is this the fastest way? I am after pure speed no matter
what the "cost", in this case.
DataRow[] dataRows = oldSet.Tables["OldTable"].Select();
for ( int dwC=0 ; dwC < dataRows.Length ; dwC++ )
{
DataRow newRow = newSet.Tables["NewTable"].NewRow();
newuRow.ItemArray = dataRows[dwC].ItemArray;
}
newSet.Tables["NewTable"].AcceptChanges();
Thanks.
another. Is this the fastest way? I am after pure speed no matter
what the "cost", in this case.
DataRow[] dataRows = oldSet.Tables["OldTable"].Select();
for ( int dwC=0 ; dwC < dataRows.Length ; dwC++ )
{
DataRow newRow = newSet.Tables["NewTable"].NewRow();
newuRow.ItemArray = dataRows[dwC].ItemArray;
}
newSet.Tables["NewTable"].AcceptChanges();
Thanks.