in the update query its giving an exception as Operand data type varchar is invalid for subtract operator
so pls help me how to solve this
da7 = new SqlDataAdapter("SELECT item_name, item_quan,item_cat FROM c_item WHERE (item_name = '" + fname + "') AND (item_cat = '1')", con);
da7.Fill(dt7);
string mname = dt7.Rows[0][0].ToString();
int quan = Convert.ToInt32(dt7.Rows[0][1].ToString())
string qu = (string)(Session["u"]);
int quantity = Convert.ToInt32(qu);
if (fname == "Singam")
{
da5 = new SqlDataAdapter("update c_order set cust_id='" + cid + "',fname='" + fname + "',oname='" + oname.Text + "',pinno='" + pinno.Text + "',validity='" + dtProjectStartDate + "',tdate='" + DateTime.Now.ToShortDateString() + "' where cust_id='" + cid + "' and order_id='" + order3 + "' ", con);
da8 = new SqlDataAdapter("[B]update c_item set item_quan = '"+quan+"' - '"+quantity+"' where item_name = '" + fname + "' and item_cat='1' [/B]", con);
da8.Fill(dt8);
}