windows200s.iis.ASP网页中修改access记录时无效
部分原码为:
<%@ Language=VBScript %>
<%
'判断用户是否登录以及具有系统管理员身份
if isempty(Session("ID")) or Session("IsSystemManager")=false then
Response.Redirect "../Login.ASP"
end if
'连接系统数据库
set conn = server.createobject ("adodb.connection")
conn.open "ASPData", "", ""
set RSDepartments = conn.Execute("select DepartmentName from Departments order by "_
& "DepartmentName")
set RSThisUser=conn.Execute ("select * from UserInfo where LoginID= '" & Session("temp") &"' ")
'修改某个用户信息
if not IsEmpty(Request.Form("Modify")) then
'校验用户的输入
if len(Request.Form("LoginID"))=0 or len(Request.Form("Name"))=0 _
or len(Request.Form("Password"))=0 then
TheMessage = "用户登录名,姓名,密码不能为空"
else
conn.Execute " update UserInfo set " _
& "EmailAddress='" & Request.Form("EmailAddress") & "', " _
& "Department='" & Request.Form("Department") & "', " _
& "Position='" & Request.Form("Position") & "', " _
& "InternalPhone='" & Request.Form("InternalPhone") & "', " _
& "HomePhone='" & Request.Form("HomePhone") & "', " _
& "MobilePhone='" & Request.Form("MobilePhone") & "', " _
& "HomeAddress='" & Request.Form("HomeAddress") & "'," _
& "Birthday='" & Request.Form("BirthdayYear") & "-" _
& Request.Form("BirthdayMonth") & "-" _
& Request.Form("BirthdayDay") & "'," _
& "QQ='" & Request.Form("QQ") & "'" _
& " Where LoginID='" & Request.Form("LoginID") &"'"
'& "IsSystemManager=" & Request.Form("IsSystemManager") & "," _
'& "IsFinancialManager=" & Request.Form("IsFinancialManager") & "," _
set RSThisUser=conn.Execute ("select * from UserInfo where LoginID= '" & Session("temp") &"' ")
TheMessage = "此用户信息已经修改成功"
end if
else
TheMessage = "请在下面修改此用户信息"
end if
%>
此页中有删除.添加都正常,更新时提示"此用户信息已经修改成功",但数据库并为成功更新!
哪位有兴趣者可告诉我如何解决吗?谢谢!
本文作者: