I have two codes I run. One requests an unshipped order to be run on Amazon. The other searches for the most recently run order number in my log table by order id. If the report is done, it downloads it. If it is not done, it tells the user that the report is not yet ready and that they should check again in a couple minutes.

Here's the problem: I run the first code and it says "request was submitted successfully". I run the second and it tells me it is not ready. However, even if I wait 30 minutes the report will not be ready. It is only after I shut down the database and reopen and run the code that it says the report is done.

I've checked and it is pulling the correct report ID. It just seems like after the request is submitted it returns the old XMLHTTP response text instead of requerying and returning the new response. Someone previously mentioned that I might need to turn off the cache in the request but I could not find how to do this. If not this, do I need to close an XMLHTTP request to reset the cache?

Here's the code I think is not working:
Code:
'THIS RETRIEVES THE MOST RECENTLY RUN OLE REPORT ID
    Dim API1 As New XMLHTTP
    'change between GET/POST for different types
    API1.Open "GET", "https://secure.amazon.com/query/...     
    API1.SetRequestHeader "Authorization", sAuthorization
    API1.SetRequestHeader "Content-Type", "text/xml"    
    API1.SetRequestHeader "Cookie", "x-main=YvjPkwfntqD.....
    API1.SetRequestHeader "Pragma", "no-cache"  'This is the part not working I think
    API1.Send

'THIS RETURNS THE RESPONSE AND PULLS OUT REPORT ID
    Dim CwsUnshpDwnID As String
    CwsUnshpDwnID = API1.ResponseText
    MostRecentCWSUsStatus = Mid(CwsUnshpDwnID, 445, 4)
    MostRecentCWSUsDownID = Mid(CwsUnshpDwnID, 710, 10)

'THIS DISPLAYS STATUS, EITHER DONE OR NOT READY, NOT READY STOPS MODULE
    If MostRecentCWSUsStatus <> "DONE" Then
        MsgBox "Most recent report is not ready, please try again later"
        Exit Function
    End If