By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,659 Members | 1,714 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,659 IT Pros & Developers. It's quick & easy.

data updated twice in web service

P: 1
data updated twice in web service


[WebMethod]
public string updateMQuantitySales(string ProductCode, int Quantity)
{
con.Open();
cmd=new SqlCommand ("update tblInventory set Quantity = (Quantity + @Quantity) where ProductCode = @ProductCode",con);
cmd.Parameters.AddWithValue("@ProductCode", ProductCode);
cmd.Parameters.AddWithValue("@Quantity",Quantity);
sda = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
sda.Fill(ds);
return ds.GetXml();

}
Jan 12 '12 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.