点击这里给我发消息 点击这里给我发消息
首页 > 行业资讯 > Windows>详细内容

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

添加时间:2010-1-4
    相关阅读: 网页 ASP 数据库 系统

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

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

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

本文作者:
咨询热线:020-85648757 85648755 85648616 0755-27912581 客服:020-85648756 0755-27912581 业务传真:020-32579052
广州市网景网络科技有限公司 Copyright◎2003-2008 Veelink.com. All Rights Reserved.
广州商务地址:广东省广州市黄埔大道中203号(海景园区)海景花园C栋501室
= 深圳商务地址:深圳市宝源路华丰宝源大厦606
研发中心:广东广州市天河软件园海景园区 粤ICP备05103322号 工商注册