问题描述
误类型:MicrosoftOLEDBProviderforODBCDrivers(0x80040E14)[Microsoft][ODBCSQLServerDriver][SQLServer]第1行:'False'附近有语法错误。/修改该用户信息.asp,第20行代码:<%@Language=VBScript%><%'判断用户是否登录以及具有系统管理员身份ifisempty(Session("UserId"))orSession("UseType")=truethenResponse.Redirect"../Login.asp"endif'连接系统数据库setconn=server.createobject("adodb.connection")conn.open"仪器管理系统","sa",""setRSDepartments=conn.Execute("selectDepartmentNamefrom单位信息orderby"_&"DepartmentName")setRSThisUser=conn.Execute("select*from用户信息whereUserId='"&Session("temp")&"'")'修改某个用户信息ifnotIsEmpty(Request.Form("Modify"))then'校验用户的输入iflen(Request.Form("UserId"))=0orlen(Request.Form("UserName"))=0_orlen(Request.Form("UserPwd"))=0thenTheMessage="用户账号,用户姓名,密码不能为空"elseconn.Execute"update用户信息set"_&"UserName='"&Request.Form("UserName")&"',"_&"UserPwd='"&Request.Form("UserPwd")&"',"_&"Department='"&Request.Form("Department")&"',"_&"UserPhone='"&Request.Form("UserPhone")&"',"_&"UserSex='"&Request.Form("UserSex")&"',"_&"Email='"&Request.Form("Email")&"',"_&"Address='"&Request.Form("Address")&"',"_&"UserType='"&Request.Form("UserType")&"',"_&"Birthday='"&Request.Form("BirthdayYear")&"-"_&Request.Form("BirthdayMonth")&"-"_&Request.Form("BirthdayDay")&"-"_&"UserType='"&Request.Form("UserType")&"',"_&"whereUserId='"&Request.Form("UserId")&"'"setRSThisUser=conn.Execute("select*from用户信息whereUserId='"&Session("temp")&"'")TheMessage="此用户信息已经修改成功"endifelseTheMessage="请在下面修改此用户信息"endif%>HTML部分代码太长发不上来,有热心知道解决的高手加我QQ61592845,我发你
解决方案
解决方案二:
没有人回答我吗?这个问题使我很困扰
解决方案三:
&"UserType='"&Request.Form("UserType")&"',"_&"whereUserId='"&Request.Form("UserId")&"'"update最后一个字段不应该有,的.改为&"UserType='"&Request.Form("UserType")&"'"_&"whereUserId='"&Request.Form("UserId")&"'"