hi, i have the following method:
what im trying to do is to copy the contents of the dataset i get on the method call to my database. that dataset comes from the same table in another database.
ive checked and in ds1 i get what i want, but the dataadapter is not updating my database, can anybody help me??
thank you
Eli
Code:
private void Sincronize(DataSet ds){
string connString=server="localhost"; uid=sa;pwd=;database=myDatabase"
SqlConnection conn=new SqlConnection(connString);
SqlDataAdapter da=new SqlDataAdapter("Select * from orders", conn);
DataSet ds1=new Dataset();
da.Fill(ds1, "orders");
ds1.Merge(ds, false, MissimgSchemaAction.Add);
da.Update(ds1, "orders");
}
what im trying to do is to copy the contents of the dataset i get on the method call to my database. that dataset comes from the same table in another database.
ive checked and in ds1 i get what i want, but the dataadapter is not updating my database, can anybody help me??
thank you
Eli