执行修改时关键字 'and' 附近有语法错误.
来源:学生作业帮 编辑:搜狗做题网作业帮 分类:综合作业 时间:2024/08/12 11:00:04
执行修改时关键字 'and' 附近有语法错误.
private string GET_RJZZQXX = "select * from rxzzqxx";
private string CHECK_RJZZQXX = "select rjzzqID,owner,softname,catagory,sydw,softnumber,djsj,otherowner from rxzzqxx where rjzzqID=@rjzzqID and owner=@owner and softname=@softname and catagory=@catagory and sydw=@sydw and softnumber=@softnumber and djsj=@djsj and otherowner=@otherowner";
private const string ADD_RJZZQXX = "insert into rxzzqxx(rjzzqID,owner,softname,catagory,sydw,softnumber,djsj,otherowner) values(@rjzzqID,@owner,@softname,@catagory,@sydw,@softnumber,@djsj,@otherowner)";
private const string DEL_RJZZQXX = "delete from rxzzqxx where rjzzqID=@rjzzqID";
private const string MOD_RJZZQXX = "update rxzzqxx set owner=@owner and softname=@softname and catagory=@catagory and sydw=@sydw and softnumber=@softnumber and djsj=@djsj and otherowner=@otherowner where rjzzqID=@rjzzqID";
private const string QUERY_RJZZQXX = "select * from rxzzqxx where ";
private const string QUER_LIST = "select * from rxzzqxx";
private const string QUER_LIST_TEXTBOX = "select * from rxzzqxx where rjzzqID=";
值不能为 null.
参数名:control if (Modify.modifyuser(rjzzqID,owner,softname,catagory,sydw,softnumber,djsj,otherowner))
{
ScriptManager.RegisterStartupScript(UpdatePanel2,this.GetType(),"updateScript","alert('修改成功!')",true);
SELECT();
}值不能为 null.
参数名:control
private string GET_RJZZQXX = "select * from rxzzqxx";
private string CHECK_RJZZQXX = "select rjzzqID,owner,softname,catagory,sydw,softnumber,djsj,otherowner from rxzzqxx where rjzzqID=@rjzzqID and owner=@owner and softname=@softname and catagory=@catagory and sydw=@sydw and softnumber=@softnumber and djsj=@djsj and otherowner=@otherowner";
private const string ADD_RJZZQXX = "insert into rxzzqxx(rjzzqID,owner,softname,catagory,sydw,softnumber,djsj,otherowner) values(@rjzzqID,@owner,@softname,@catagory,@sydw,@softnumber,@djsj,@otherowner)";
private const string DEL_RJZZQXX = "delete from rxzzqxx where rjzzqID=@rjzzqID";
private const string MOD_RJZZQXX = "update rxzzqxx set owner=@owner and softname=@softname and catagory=@catagory and sydw=@sydw and softnumber=@softnumber and djsj=@djsj and otherowner=@otherowner where rjzzqID=@rjzzqID";
private const string QUERY_RJZZQXX = "select * from rxzzqxx where ";
private const string QUER_LIST = "select * from rxzzqxx";
private const string QUER_LIST_TEXTBOX = "select * from rxzzqxx where rjzzqID=";
值不能为 null.
参数名:control if (Modify.modifyuser(rjzzqID,owner,softname,catagory,sydw,softnumber,djsj,otherowner))
{
ScriptManager.RegisterStartupScript(UpdatePanel2,this.GetType(),"updateScript","alert('修改成功!')",true);
SELECT();
}值不能为 null.
参数名:control
![执行修改时关键字 'and' 附近有语法错误.](/uploads/image/z/16031674-10-4.jpg?t=%E6%89%A7%E8%A1%8C%E4%BF%AE%E6%94%B9%E6%97%B6%E5%85%B3%E9%94%AE%E5%AD%97+%27and%27+%E9%99%84%E8%BF%91%E6%9C%89%E8%AF%AD%E6%B3%95%E9%94%99%E8%AF%AF.)
update rxzzqxx set owner=@owner and softname=@softname and catagory=@catagory and sydw=@sydw and softnumber=@softnumber and djsj=@djsj and otherowner=@otherowner where rjzzqID=@rjzzqID
把set后的and改成逗号,
update rxzzqxx set owner=@owner ,softname=@softname ,catagory=@catagory ,sydw=@sydw ,softnumber=@softnumber ,djsj=@djsj ,otherowner=@otherowner where rjzzqID=@rjzzqID;
补充:
在update或者insert 的时候,有字段不允许为null,但是你传了null过去.
再问: 您看一下后面的问题 大神求指导 我刚开始学这个
把set后的and改成逗号,
update rxzzqxx set owner=@owner ,softname=@softname ,catagory=@catagory ,sydw=@sydw ,softnumber=@softnumber ,djsj=@djsj ,otherowner=@otherowner where rjzzqID=@rjzzqID;
补充:
在update或者insert 的时候,有字段不允许为null,但是你传了null过去.
再问: 您看一下后面的问题 大神求指导 我刚开始学这个