Redirect After update help

Discussion in 'ASP General' started by Mangler, Feb 13, 2007.

  1. Mangler

    Mangler Guest

    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?
    Mangler, Feb 13, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andreas Klemt
    Replies:
    7
    Views:
    20,242
    Byock
    Nov 27, 2006
  2. =?Utf-8?B?TWljaGFlbA==?=

    How to update datagrid after update

    =?Utf-8?B?TWljaGFlbA==?=, Mar 17, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    495
    Alex D.
    Mar 17, 2006
  3. Sal
    Replies:
    1
    Views:
    375
  4. Stephan Kämper
    Replies:
    1
    Views:
    132
    Assaph Mehr
    Jul 15, 2006
  5. eatmoreoats

    help with LWP and log in after redirect

    eatmoreoats, Mar 4, 2008, in forum: Perl Misc
    Replies:
    2
    Views:
    165
    eatmoreoats
    Mar 4, 2008
Loading...

Share This Page