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

王朝asp·作者佚名  2006-01-09
窄屏简体版  字體: |||超大  

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

%>

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

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

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航