windows200s.iis.asp网页中修改access记录时无效

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
%>

此页中有删除.添加都正常,更新时提示"此用户信息已经修改成功",但数据库并为成功更新!

哪位有兴趣者可告诉我如何解决吗?谢谢!

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
©️2022 CSDN 皮肤主题:大白 设计师:CSDN官方博客 返回首页

打赏作者

Menst

你的鼓励将是我创作的最大动力

¥2 ¥4 ¥6 ¥10 ¥20
输入1-500的整数
余额支付 (余额:-- )
扫码支付
扫码支付:¥2
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值