q; copy daya from one dataset to another
|
| q; copy daya from one dataset to another | Hello, I am trying to write the data I got from a web service to my table in SQL Server I need to append the dataset wsDS to the dataset ds and do update.
PVS.myWS.Loader load = new PVS.myWS.Loader(); DataSet wsDS=load.WsLoad(); dataGrid1.DataSource=wsDS;
string strConn = ConfigurationSettings.AppSettings["connectionString"]; SqlConnection sqlConn = new SqlConnection(strConn);
DataSet ds = new DataSet(); SqlDataAdapter daRS = new SqlDataAdapter("SELECT * From myTable", sqlConn); SqlCommandBuilder cbRS = new SqlCommandBuilder(daRS); sqlConn.Open(); daRS.Fill(ds,"myTable");
/* ??? here I need some code */ /* Append data in wsDS to ds to write it back to myTable */
daRS.Update(ds,"myTable"); sqlConn.Close();
Can anyone give me the easiest and fasted way?
|
|
|
|
|
 | Members Area | |
|
 | Last Web Marketing |
|
|
|
|
 | Last Programming Tips |
|
|
|
|
 | Last News |
|
|
|
|
|
|