Copy one dataset data into another problem

  • Thread starter Thread starter Mo
  • Start date Start date
M

Mo

Hi,

I have two datasets on two databases one remote and one local. I am
trying to copy the local data into the remote. Both tables have the
same structure. I use the following

DataTable Remote_Table = new DataTable();
Remote_Table = dsRemote.Tables[0].Clone();
DataRow[] DR_Local = dsLocal.Tables[0].Select();
foreach(DataRow Local_Data in(DR_Local))
{
Remote_Table.ImportRow(Local_Data);
}
Remote_Table.LoadDataRow(DR_Local, true);


I endup with the following error:
Input array is longer than the number of columns in this table
on the last line! Any ideas out there?

Thanks
 
Back
Top