R
robert
Whats wrong w/ my code, the Cust_ID cannot change (it's autonumber
from access 2000), i'm getting a page cannot display error:
<%Dim ChangePass
Set ChangePass = Server.CreateObject("ADODB.Connection")
ConnStr = "DRIVER={Microsoft Access Driver (*.mdb)}; "
ConnStr = ConnStr & "DBQ=" & Server.MapPath("..\fpdb\aaqa.mdb")
ChangePass.Open(ConnStr)
SQLtemp = "SELECT * FROM contact_TBL WHERE Cust_ID = '" &
request.form("Cust_ID") & "' "
Set rs = ChangePass.Execute(SQLtemp)
while not rs.eof
If Request.Form("Cust_ID") = rs("Cust_ID") then
SQL = "UPDATE contact_TBL SET Cust_Name = '" &
Request.Form("Cust_Name") & "' " WHERE Cust_ID = '" &
Request.Form("Cust_ID") & "'
ChangePass.Execute(sql)
Response.redirect ("updated2.asp")
Else
Response.redirect ("changerror.asp")
End If
rs.MoveNext
Wend
OnError response.Redirect ("changerror.asp")
rs.Close
ChangePass.Close
set ConnStr = Nothing
%>
from access 2000), i'm getting a page cannot display error:
<%Dim ChangePass
Set ChangePass = Server.CreateObject("ADODB.Connection")
ConnStr = "DRIVER={Microsoft Access Driver (*.mdb)}; "
ConnStr = ConnStr & "DBQ=" & Server.MapPath("..\fpdb\aaqa.mdb")
ChangePass.Open(ConnStr)
SQLtemp = "SELECT * FROM contact_TBL WHERE Cust_ID = '" &
request.form("Cust_ID") & "' "
Set rs = ChangePass.Execute(SQLtemp)
while not rs.eof
If Request.Form("Cust_ID") = rs("Cust_ID") then
SQL = "UPDATE contact_TBL SET Cust_Name = '" &
Request.Form("Cust_Name") & "' " WHERE Cust_ID = '" &
Request.Form("Cust_ID") & "'
ChangePass.Execute(sql)
Response.redirect ("updated2.asp")
Else
Response.redirect ("changerror.asp")
End If
rs.MoveNext
Wend
OnError response.Redirect ("changerror.asp")
rs.Close
ChangePass.Close
set ConnStr = Nothing
%>