470,849 Members | 686 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,849 developers. It's quick & easy.

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?

May 16 '06 #1
0 734

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by suzy | last post: by
7 posts views Thread by lgbjr | last post: by
4 posts views Thread by JIM.H. | last post: by
4 posts views Thread by Soulless | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.