I have a DB that has records (ID, UserID,Password,Email, and DateEntered) in the table(tblUsers). I have created an ASP page that will list all records in the table and place a "Edit" redirect button to go to that specific record and make changes. All of that works, but, however, when I make changes and submit them, the changes only apply to the first record all of the time! In other words, if I make changes to record ID #40, then the changes only apply to record #1! Agggh! I'm doing this in a 3 step process...ASP page that simply displays records with the redirect URL field by each record, the HTML form that displays the data per record ID and the ASP page that's supposed to update that record chosen. The code that I am supplying is from the ASP that does the work... Here's the code:
<%
on error resume next
form_userid=request.form("
userID")
form_password=request.form
("password
")
form_email=request.form("e
mail")
form_ID=request.form("ID")
set conn=server.createobject("
ADODB.conn
ection")
conn.provider="Microsoft.J
et.OLEDB.4
.0"
conn.Open "c:/db/pics/mbvault.mdb"
form_userid=Replace(form_u
serid,"'",
"''")
if instr(lcase(form_userid),"
<img")>0 then
form_userid=""
end if
set rs = Server.CreateObject("ADODB
.Recordset
")
rs.Open "tblUsers",conn,1,3,&H0002
rs.Filter "ID = " & form_ID
if not rs.EOF then
rs("UserID") = form_userid
rs("Password") = form_password
rs("Email") = form_email
rs.Update
end if
response.write "<p align='center'><font color='red'><b>Everything Went Fine! Record is now UPDATED!</b></font></p><br
>"
rs.close
set rs = nothing
conn.Close
set conn = nothing
%>
Someone, please HELP! This is the last step in this project, but I'm hung on it! :)
Thanks in advance!
Jguy
Start Free Trial