windows200s.iis.asp页面中更改access记录时无效
发表时间:2024-01-27 来源:明辉站整理相关软件相关文章人气:
[摘要]windows200s.iis.asp网页中修改access记录时无效 部分原码为: <%@ Language=VBScript %> <% '判断用户是否登录以及具有系统管理员身份 if isempty(Session("ID")) or Sessi...
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
%>
此页中有删除.添加都正常,更新时提示"此用户信息已经修改成功",但数据库并为成功更新!
哪位有兴趣者可告诉我如何解决吗?谢谢!