Importing Data From a Webservice Data set into the database

  • Thread starter Thread starter Kifaro
  • Start date Start date
K

Kifaro

Hi I am looking for info on the correct way to import data from a dataset
directly into my local SQL Server database. I need to take into account PK
id. I could look through the data, but I think there has to be a better
way!!!

Thanks
 
Here is a Long way ...if you asked the same.



for (int i = 0 ; i < dataSet2.Tables["myremotedata"].Rows.Count; i ++)

{

dataSet1.Tables["mylocaldata"].Rows.Add(dataSet2.Tables["myremotedata"].Rows
.ItemArray);

}

oleDbDataAdapter1.Update(dataSet1, "mylocaldata");
 
Back
Top