0

So I'm trying to update a record within a table I created. The form processes but for some reason I don't see the table columns updated. The HTML form is

<form action="divProgramProcess.asp?div=<% =divrec %>" id="countInput" class="contact_form">

<input type="text"  name="Shipment_Current" id="Shipment_Current" value="<% =Shipment_Current %>" />
<input type="text"  name="Couch_Current" id="Couch_Current"  value="<%= Couch_Current %>" />
<input type="text"  name="Person_Available_Current" id="Person_Available_Current"  value="<%= Person_Available_Current %>" />
</form>

The code within divProgramProcess.asp is

<%
divrec = request.QueryString("div")
Set rstest = Server.CreateObject("ADODB.Recordset")
rstest.locktype = adLockOptimistic
sql = "SELECT top 1 * FROM CensusFacility_Records_Last WHERE Count = '1239' "
rstest.Open sql, db
%>


<body> 
<%
Shipment_Current = request.form("Shipment")
Couch_Current = request.form("Couch")
Person_Available_Current = request.form("Person_Available")

rstest("Shipment") = Shipment_Current
rstest("Couch") = Couch_Current
rstest("Person_Available") = Person_Available_Current
rstest.update
Response.Redirect("chooseScreen.asp")
%>

1 Answer 1

1

If you have some information you know you're going to pass, you may find it easier to just set it as a hidden input.

For example, instead of what you're doing above, do this with your form:

<form action="divProgramProcess.asp" id="countInput" class="contact_form">

<input type="text"  name="Shipment_Current" id="Shipment_Current" value="<% =Shipment_Current %>" />
<input type="text"  name="Couch_Current" id="Couch_Current"  value="<%= Couch_Current %>" />
<input type="text"  name="Person_Available_Current" id="Person_Available_Current"  value="<%= Person_Available_Current %>" />
<input type="hidden" name="div" value="<% =divrec %>" />
</form>

And pull the value of div from the Request.Form collection.

Sign up to request clarification or add additional context in comments.

1 Comment

Great advice. Appreciate it

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.