Hi,
Try this if could help...
string sqlCmdText = "UPDATE Bank SET Payment = (Payment - " + tprice.Text + ") WHERE NICNO = '" + FN.Text + "'";
SqlConnection conn = new SqlConnection("YourWebConfigConnectionStringID");
using (SqlCommand cmd = new SqlCommand(sqlCmdText, conn))
{
cmd.CommandType = CommandType.Text;
try
{
conn.Open();
cmd.ExecuteNonQuery();
}
catch (SqlException)
{
}
finally
{
cmd.Dispose();
conn.Dispose();
}
}
Please do not forget to vote if could help...
Happy coding...