执行修改时关键字 'and' 附近有语法错误。

privatestringGET_RJZZQXX="select*fromrxzzqxx";privatestringCHECK_RJZZQXX="selectrjzzq... 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
展开
 我来答
幸巴达
2013-08-07 · TA获得超过1.2万个赞
知道大有可为答主
回答量:6953
采纳率:38%
帮助的人:2399万
展开全部
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过去。
追问
您看一下后面的问题  大神求指导 我刚开始学这个
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式