在我的数据库中,我有一个带有“tblstatus”和“tblemployeereimbursmenttable”的表。
这里的状态是这种格式
1 员工
待定 2 经理待定
3 经理发回
4 财务待定
5 财务发回
6 客户负责人待定
7 客户负责人发回
8 已批准
And Given PK and FK relationship to two tables Here when the button clicked than status update to 2 in gridview.
if(Session["statusID"] == 1)
{
using(SqlConnection con = new SqlConnection(ConnectionString))// set ConnectionString
{
using(SqlCommand cmd = new SqlCommand("update from table set statusID=2 where expenesesid=@expensesid",con)) // set appropriate query
{
sqldatadapter da=new sqldatadapter(cmd) ;
con.Open();
cmd.ExecuteNonQuery();
}
}
}
But it's showing error can any one help me please....