高手帮帮忙,我的代码有错误如何修改
错误是只能修改最上或最下的密码,中间的则修改不了
<%
' 建立Connection 对象
Set conn = Server.CreateObject("ADODB.Connection")
Provider = "Provider=Microsoft.Jet.OLEDB.4.0;"
DBPath = "Data Source=" & Server.MapPath( "userid.mdb" )
' 连接数据库
conn.Open Provider & DBPath
Set rs = Server.CreateObject("ADODB.Recordset")
' 打开数据表Connection对象
'rs.Open "userid", conn, 1, 3
rs.open "select ID,UserID,Password from UserID", conn, 1, 3
%>
<%
userid=request("userid")
newpwd=request("newpwd")
newpwd2=request("newpwd2")
response.write userid&" "
response.write newpwd&" "
response.write newpwd2&" "
if newpwd<>newpwd2 then
response.write "两次输入的密码不一致!"
end if
rs.movefirst
'if (not rs.eof) and (not rs.bof) then
for i=0 to rs.fields.count-1
if rs(i)=userid then
pwd=array("password")
pwd2=array(newpwd)
rs.update pwd,pwd2
end if
rs.movenext
next
'end if
%>