Redirect After update help

M

Mangler

I have a form that does multiple updates on the page. For some reason
that I cant figure out it is redirecting before the update is done.
It doesnt do this on another page that I have.

<%
If Request("Submit") <> "" Then
intRecIDs = Replace(Request("hidRecIDs"), "*", "") ' remove all the
asterisks, to create a list like this: 2, 5, 8, 9 etc.
arrRecIDs = Split(intRecIDs, ", ") ' Create an array, wich will
contain just the IDs of the records we need to update
For i = 0 to Ubound(arrRecIDs) ' Loop trough the array
strText = Replace(Request("qty" & arrRecIDs(i)), "'", "''")


set commUpdate = Server.CreateObject("ADODB.Command")
commUpdate.ActiveConnection = MM_connReclaim_STRING
commUpdate.CommandText = "UPDATE inventory SET qty = '" & strtext &
"' WHERE sku = '" &arrRecIDs(i) & "'"
commUpdate.CommandType = 1
commUpdate.CommandTimeout = 0
commUpdate.Prepared = true
commUpdate.Execute()
Next
strMessage = i & " Records Updated"
Response.Redirect("updateinventory?Message=" & strMessage)

End If

%>

Does anyone see why this may be happening?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top