M
Matt
I have the following in a page and I am trying to update a record on
the next page but for some reason the form data is not carrying over.
Any ideas why?
<form name=nxtlupdate method=post action=supers_NxtlUpdate.asp>
<%
Do While Not objRecordset.EOF
Response.Write "<tr>"
Response.Write "<td align=center valign=top><input
type=text name=ContactName size=15 value='" &
objRecordset("ContactName") & "'></td>"
Response.Write "<td valign=top align=center><input
type=text name=Radio size=4 value='" & objRecordset("Radio") &
"'></td>"
Response.Write "<td valign=top align=center><input
type=text name=Mobile size=10 value='" & objRecordset("Mobile") &
"'></td>"
Response.Write "<td valign=top align=center><a
href=supers_nxtlUpdate.asp?ID="
Response.Write objRecordset("Id") & ">Update</a></td>"
Response.Write "</tr><tr><td colspan=6><hr></td></tr><tr>"
objRecordset.MoveNext
Loop
objRecordset.Close
%>
</form>
***** Second Page: *****
<%
dim strContactName, strRadio
dim strMobile, strID
strConnect = "Driver={Microsoft Access Driver (*.mdb)};
DBQ=\\CALSJ1\PMAPPS\nextel.mdb"
Set objRecordset = Server.CreateObject ("ADODB.Recordset")
objRecordset.Open "tblContactList", strConnect, adOpenStatic,
adLockOptimistic, adCmdTable
strID = Request.QueryString("ID")
strContactName = Request.Form("ContactName")
strRadio = Request.Form("Radio")
strMobile = Request.Form("Mobile")
objRecordset.Filter = "ID='" & strID & "'"
objRecordset("ContactName") = strContactName
objRecordset("Radio") = strRadio
objRecordset("Mobile") = strMobile
objRecordset.Update
objRecordset.Close
set objRecordset = Nothing
%>
the next page but for some reason the form data is not carrying over.
Any ideas why?
<form name=nxtlupdate method=post action=supers_NxtlUpdate.asp>
<%
Do While Not objRecordset.EOF
Response.Write "<tr>"
Response.Write "<td align=center valign=top><input
type=text name=ContactName size=15 value='" &
objRecordset("ContactName") & "'></td>"
Response.Write "<td valign=top align=center><input
type=text name=Radio size=4 value='" & objRecordset("Radio") &
"'></td>"
Response.Write "<td valign=top align=center><input
type=text name=Mobile size=10 value='" & objRecordset("Mobile") &
"'></td>"
Response.Write "<td valign=top align=center><a
href=supers_nxtlUpdate.asp?ID="
Response.Write objRecordset("Id") & ">Update</a></td>"
Response.Write "</tr><tr><td colspan=6><hr></td></tr><tr>"
objRecordset.MoveNext
Loop
objRecordset.Close
%>
</form>
***** Second Page: *****
<%
dim strContactName, strRadio
dim strMobile, strID
strConnect = "Driver={Microsoft Access Driver (*.mdb)};
DBQ=\\CALSJ1\PMAPPS\nextel.mdb"
Set objRecordset = Server.CreateObject ("ADODB.Recordset")
objRecordset.Open "tblContactList", strConnect, adOpenStatic,
adLockOptimistic, adCmdTable
strID = Request.QueryString("ID")
strContactName = Request.Form("ContactName")
strRadio = Request.Form("Radio")
strMobile = Request.Form("Mobile")
objRecordset.Filter = "ID='" & strID & "'"
objRecordset("ContactName") = strContactName
objRecordset("Radio") = strRadio
objRecordset("Mobile") = strMobile
objRecordset.Update
objRecordset.Close
set objRecordset = Nothing
%>