I can't Figure out what is wrong with the query, but it is not updating any value in the Table
string qry = "UPDATE Stock SET Itemname=@n,Unit=@u,Price=@p,Tax=@t,Balance=@b,Status=@s Where Sid=@sid";
OleDbCommand ocmd = new OleDbCommand(qry,BBC);
ocmd.Parameters.AddWithValue("@n", name);
ocmd.Parameters.AddWithValue("@u", unit);
ocmd.Parameters.AddWithValue("@p", price);
ocmd.Parameters.AddWithValue("@t", tax);
ocmd.Parameters.AddWithValue("@b", balance);
ocmd.Parameters.AddWithValue("@s", status);
ocmd.Parameters.AddWithValue("@sid", sid);
ocmd.ExecuteNonQuery();
Price
,Tax
and Balance
are Decimal
values.
I did debug and its working fine but just not updating the value.