Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Mar 2007
    Location
    Wikltshire UK
    Posts
    152
    Thanks
    2
    Thanked 0 Times in 0 Posts
    HI All,

    Been scratching my head over this one for days.

    I've got some code that downloads a file from the net and assigns the result to a Variable (HoldString):
    Set objHTTP = New HTTP
    With objHTTP
    .HttpURL = "SomeURL"
    .PromptWithCommonDialog = False
    .ConnectToHTTPHost
    End With
    HoldString = objHTTP.WriteHTTPDataToString
    Set objHTTP = Nothing

    I then split the variable and Add Data Using:
    QD = Freefile
    Open "C:\NewsT.txt" For Append As #QD
    Print #QD, HoldString
    Print #QD, "Some TExt"
    Close #QD
    Reset

    Then it is Uploaded (FTP).

    For some reason the data seems to stay ?Memory Resident? even if I close the database, and each time I run the code, just uses the first file downloaded every day, until I reboot the machine. (IE the last additions to the file are uploaded but not the previous data from that day WIERD!!) All the variables seem to work to a certain point but then just default as stated above??

    Can anyone see the problem from the code. I can supply more details if necessary? A negative will allow me to look elsewhere in the code, but I'm almost certain its within these processes

    TX all.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    I don't understand

    ... just uses the first file downloaded every day, until I reboot the machine. (IE the last additions to the file are uploaded but not the previous data from that day...

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts
    [quote name='graliv1' post='783481' date='08-Jul-2009 02:40']For some reason the data seems to stay ?Memory Resident? even if I close the database, and each time I run the code, just uses the first file downloaded every day, until I reboot the machine.[/quote]
    Does your code automate IE? If so, can you solve the problem by turning off caching in IE? If so, you may need to send different cache headers with the file you are retrieving from SomeURL. Or, as a cheat, add a throwaway querystring, such as SomeURL?t=timestamp so that IE will view each retrieval as unique.

  4. #4
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts
    What is the code supposed to do, download a file? What do you intend to do next with that string variable's content?
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  5. #5
    2 Star Lounger
    Join Date
    Mar 2007
    Location
    Wikltshire UK
    Posts
    152
    Thanks
    2
    Thanked 0 Times in 0 Posts
    [quote name='pieterse' post='783753' date='09-Jul-2009 12:02']What is the code supposed to do, download a file? What do you intend to do next with that string variable's content?[/quote]

    Yes It downloads a File then Appends new Data in a specific format(XML) and then uploads again with the new content. A little more complicated, but that is essentially it.

  6. #6
    2 Star Lounger
    Join Date
    Mar 2007
    Location
    Wikltshire UK
    Posts
    152
    Thanks
    2
    Thanked 0 Times in 0 Posts
    [quote name='jscher2000' post='783717' date='09-Jul-2009 05:23']Does your code automate IE? If so, can you solve the problem by turning off caching in IE? If so, you may need to send different cache headers with the file you are retrieving from SomeURL. Or, as a cheat, add a throwaway querystring, such as SomeURL?t=timestamp so that IE will view each retrieval as unique.[/quote]
    Thanks for this one. I have some Positive results by Switching In IE8 to Browsing History --> Settings --> Check for Newer Versions of Stored Page --> Every Time I visit the page
    So We have a winner (WAHAY)

    I am now experimenting with the other part of your suggestion

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •