Each time I use Merge() I have the following: ‘Cannot implicitly convert type ‘void’ to ‘System.Data.DataTable’.
Can you please let me know what is wrong in my code ?
DataRow[] befdvd = toverify.Select("Date < '# " + dvddate + "#'");
DataRow[] aftdvd = toverify.Select("Date => '# " + dvddate + "#'");
foreach (DataRow dr in befdvd )
dr[gl.EX_PRICE] = (double)dr[gl.EX_PRICE] * dvdfact;
DataTable beff = befdvd.CopyToDataTable();
DataTable Aftt = aftdvd.CopyToDataTable();
toverify = beff.Merge(Aftt);
Thanks
Read the error message.
Merge()returnsvoid.You can’t assign that to a
DataTablevariable.Merge()merges the second table into the first one; it does not create a new table.