windows200s.iis.asp頁面中更改access記錄時無效
發(fā)表時間:2024-01-27 來源:明輝站整理相關(guān)軟件相關(guān)文章人氣:
[摘要]windows200s.iis.asp網(wǎng)頁中修改access記錄時無效 部分原碼為: <%@ Language=VBScript %> <% '判斷用戶是否登錄以及具有系統(tǒng)管理員身份 if isempty(Session("ID")) or Sessi...
windows200s.iis.asp網(wǎng)頁中修改access記錄時無效
部分原碼為:
<%@ Language=VBScript %>
<%
'判斷用戶是否登錄以及具有系統(tǒng)管理員身份
if isempty(Session("ID")) or Session("IsSystemManager")=false then
Response.Redirect "../Login.asp"
end if
'連接系統(tǒng)數(shù)據(jù)庫
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 = "此用戶信息已經(jīng)修改成功"
end if
else
TheMessage = "請在下面修改此用戶信息"
end if
%>
此頁中有刪除.添加都正常,更新時提示"此用戶信息已經(jīng)修改成功",但數(shù)據(jù)庫并為成功更新!
哪位有興趣者可告訴我如何解決嗎?謝謝!