Redirect After update help

Redirect After update help

am 13.02.2007 19:37:52 von 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?