求助......

denglin 2006-07-13 01:38:28
错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] 操作必须使用一个可更新的查询。
/myweb/IDmanage/xgmm0.asp, 第 21 行


浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; (R1 1.3); .NET CLR 1.1.4322)

网页:
POST 56 ??? /myweb/IDmanage/xgmm0.asp

POST Data:
name=4&passwd=4&pass1=4&pass2=4&submit1=++%CC%E1%BD%BB++

时间:
2006年7月13日, 13:35:14


详细信息:
Microsoft 支持
这是怎么回事.
程序如下

<%@ Language=VBScript %>
<%
name=trim(request("name"))
passwd=trim(request("passwd"))
pass1=trim(request("pass1"))
pass2=trim(request("pass2"))

if name<>"" and passwd<>"" then
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("../试题库.mdb")
set rs= server.createobject("adodb.recordset")
sql= "select * from 用户记录 where 用户名='"& name &"' and 密码='"& passwd &"'"
Set rs= conn.Execute(sql)
if not rs.eof then
if pass1<>pass2 then
response.write "两次密码不一致!"
else
session("pass")=1
session("user")=name
sql="update 用户记录 set 密码='"& pass1 &"' where 用户名='"& name &"'"
conn.execute(sql)
conn.close
response.redirect "../mainselect.asp"
end if
else
Response.Write "非法用户!"
end if
else
end if
%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>网络考场</title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<meta NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
</head>

<body background="../images/1024.jpg">

<form action="xgmm0.asp" id="FORM1" method="post" name="FORM1">
<table border="0" width="100%">
<tr>
<th width="100%"><table border="0" width="100%">
<tr>
<th width="100%"><img src="../Images/back.gif" alt="背景.gif (87350 bytes)"></th>
</tr>
</table>
</th>
</tr>
</table>
<div align="center"><center><h2 title>用户名: <input id="text1" name="name"
style="HEIGHT: 22px; WIDTH: 100px" size="20"></h2>
</center></div><div align="center"><center><h2 title>旧口令: <input id="password1"
name="passwd" style="HEIGHT: 22px; WIDTH: 100px" type="password" size="20"></h2>
</center></div><div align="center"><center><h2 title>新口令: <input id="password1"
name="pass1" style="HEIGHT: 22px; WIDTH: 100px" type="password" size="20"></h2>
</center></div><div align="center"><center><h2 title>新口令: <input id="password1"
name="pass2" style="HEIGHT: 22px; WIDTH: 100px" type="password" size="20"></h2>
</center></div><table border="0" width="100%">
<tr>
<td width="100%" checked="false"></td>
</tr>
</table>
<div align="center"><center><p title><input id="submit1" name="submit1" type="submit"
style="font-size: large; font-style: normal; font-variant: normal; font-weight: bold; background-image: url('../Images/enter3.bmp'); background-repeat: no-repeat; background-position: center 50%"
title value=" 提交 "></p>
</center></div>
</form>
</body>
</html>

...全文
60 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
jspadmin 2006-07-13
  • 打赏
  • 举报
回复
<!--#include file="conn.asp"--> 连接数据库
<!--#include file="chkmanage.asp"--> 登陆验证
<!--#include file=md5.asp --> md5加密

<%
dim pass1,pass2,passtem
pass=request("pass")
pass1=request("pass1")
pass2=request("pass2")
if pass1="" then
session("wrong")="密码不能为空"
response.redirect "error.asp"
end if
if pass1<>pass2 then
session("wrong")="两次输入的密码不同"
response.redirect "error.asp"
end if
name=request("name")
pass3=request("pass1")
pass3=MD5(pass3)
pass=MD5(pass)
set rs=server.createobject("adodb.recordset")
sql="select * from [admin] where id=1"
rs.open sql,conn,1,3
if pass<>rs("password") then
rsclose()
connclose()
session("wrong")="旧密码错误!"
response.redirect "error.asp"
end if

rs("username")=name
rs("password")=pass3
rs.update
rsclose()
connclose()
%>
<%
Response.Cookies("lunjilyb")("username")=request("name")
Response.Cookies("lunjilyb")("password")=MD5(pass3)
%>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>成功修改--<%=lybtitle%>
</title>
<!--#include file="style.asp"-->
</head><body>
<!--#include file="menu.asp"--><br><br>
<p align="center">成功修改!</p>
</body>

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧