tigrot Well-Known Member Licensed User Longtime User Sep 11, 2015 #1 Hi Everybody, If in JOBDONE sub I put the next code: Code: Copy If job.Success=False Then job.Release End If in case of success=False I get an error "File missing". I have seen that the "Release" sub deletes a temporary file. In the examples the release is issued in any case, both successful or not. In my opinion if no answer comes from the server the temp file is never created. Am I wrong? regards Mauro
Hi Everybody, If in JOBDONE sub I put the next code: Code: Copy If job.Success=False Then job.Release End If in case of success=False I get an error "File missing". I have seen that the "Release" sub deletes a temporary file. In the examples the release is issued in any case, both successful or not. In my opinion if no answer comes from the server the temp file is never created. Am I wrong? regards Mauro
DonManfred Expert Licensed User Longtime User Sep 11, 2015 #2 Job.Release should be done at the end of the event sub. In BOTH situations... Success true/false Upvote 0
tigrot Well-Known Member Licensed User Longtime User Sep 11, 2015 #3 I have probably found the issue: I was connecting www.google.it Code: Copy Dim sito As String= "http://www.google.it" If httpx.IsInitialized=False Then httpx.Initialize("httpx",Me) httpx.Download(sito) Crashes on Job.GetString with no file.... Although job.success is true. In my opinion the download of the page is not finished when jobdone event is issued. Mauro Upvote 0
I have probably found the issue: I was connecting www.google.it Code: Copy Dim sito As String= "http://www.google.it" If httpx.IsInitialized=False Then httpx.Initialize("httpx",Me) httpx.Download(sito) Crashes on Job.GetString with no file.... Although job.success is true. In my opinion the download of the page is not finished when jobdone event is issued. Mauro
DonManfred Expert Licensed User Longtime User Sep 11, 2015 #4 tigrot said: Dim sito As String= "http://www.google.it" If httpx.IsInitialized=False Then httpx.Initialize("httpx",Me) httpx.Download(sito) Click to expand... Looks like you are dimming it just ONCE and not for each download.. try Code: Copy Dim sito As String= "http://www.google.it" dim httpx as httpjob ' Use a DIM for EACH Job you want to execute httpx.Initialize("httpx",Me) httpx.Download(sito) Upvote 0
tigrot said: Dim sito As String= "http://www.google.it" If httpx.IsInitialized=False Then httpx.Initialize("httpx",Me) httpx.Download(sito) Click to expand... Looks like you are dimming it just ONCE and not for each download.. try Code: Copy Dim sito As String= "http://www.google.it" dim httpx as httpjob ' Use a DIM for EACH Job you want to execute httpx.Initialize("httpx",Me) httpx.Download(sito)
DonManfred Expert Licensed User Longtime User Sep 11, 2015 #5 tigrot said: In my opinion the download of the page is not finished when jobdone event is issued. Click to expand... i cannot agree. When i get a job.success then the page i loaded is finished loading. in case of google i have the html-code in job.getstring Upvote 0
tigrot said: In my opinion the download of the page is not finished when jobdone event is issued. Click to expand... i cannot agree. When i get a job.success then the page i loaded is finished loading. in case of google i have the html-code in job.getstring
tigrot Well-Known Member Licensed User Longtime User Sep 12, 2015 #6 I get the error in GetString()(the file containing data from internet server is missing). What's the need for isInitialized call if you need to initialize every time, gothic question....? Thank you Don(the kindest IT man around!). I took away the code, since it was only a test to see if Internet was up. Best regards and have an happy week end! Mauro Upvote 0
I get the error in GetString()(the file containing data from internet server is missing). What's the need for isInitialized call if you need to initialize every time, gothic question....? Thank you Don(the kindest IT man around!). I took away the code, since it was only a test to see if Internet was up. Best regards and have an happy week end! Mauro
DonManfred Expert Licensed User Longtime User Sep 12, 2015 #7 tigrot said: What's the need for isInitialized call if you need to initialize every time, gothic question....? Click to expand... The need is not the second (3rd, 4th...) initialisation. The need is the creating of a new instance (DIM) of httpjob (this includes the initialisation though) Upvote 0
tigrot said: What's the need for isInitialized call if you need to initialize every time, gothic question....? Click to expand... The need is not the second (3rd, 4th...) initialisation. The need is the creating of a new instance (DIM) of httpjob (this includes the initialisation though)