This code only adds one row to the "myTable2", even though there are multiple rows in myTable, and the program cycles thorugh the loop multiple times.Code:foreach( DataRow row1 in myTable.Rows ) { DataRow row2= ds.Tables["myTable2"].NewRow(); //do stuff to the row2, update it with data from row1 ds.Tables["myTable2"].ImportRow( row ); ds.AcceptChanges(); }
What's the problem?




Reply With Quote