DataTable ResultSet = csCOSApp.ActiveProject.dsDataStore.Tables[0].Copy(); ResultSet.Rows.Clear(); csCOSApp.ActiveProject.dsDataStore.Tables[0].Select("ProductId > 0").CopyToDataTable(ResultSet, LoadOption.PreserveChanges, delegate { }); if (ResultSet.Rows.Count > 0) { LoadProducts(ResultSet, true); } ResultSet.Rows.Clear(); csCOSApp.ActiveProject.dsDataStore.Tables[0].Select("ProductId = 0").CopyToDataTable(ResultSet, LoadOption.PreserveChanges, delegate { }); if (ResultSet.Rows.Count > 0) { LoadParts(ResultSet, true); }I was getting "Input array is longer than the number of columns in this table.". Turns out the destination table needs to have the structure all set up. I thought CopyToDataTable would create it.