|
-
May 22nd, 2006, 04:05 AM
#1
Thread Starter
Hyperactive Member
Inet stillexecuting issue
I am using inet to read the html of some websites and return the data as a string. I am using the open url method.
e.g
VB Code:
html_source = Inet1.OpenURL(site_str & folder)
The program thread waits here until the inet control returns the html (or generates an error)
However, the code is running in a loop so comes back around to read the next webpage. This sometimes generates an error '35764 - Still executing last request'
How can this be possible? I have already got the html e.g the request. What is the control still doing?
I have added this code
VB Code:
While Inet1.StillExecuting
DoEvents
Wend
to prevent this error, even though I don't understand why its occuring!
Also could I change it do this?
VB Code:
While Inet1.StillExecuting
Inet1.Cancel
DoEvents
Wend
would this be better than the above code as it will attempt to cancel the operation rather than wait?
Thanks
-
May 22nd, 2006, 04:15 AM
#2
Fanatic Member
Re: Inet stillexecuting issue
While inet.still executing u should apply goto statement witha label showing a msgbox. or u can apply if statement and then u can apply a code to show a msgbox.
Dont rely only on your luck. Work hard until You get success.
vb Code:
Private sub Time_ispassing
While Me.Notgetsuccess
trygain=tryagain+1
Me.workhard
wend
end sub
-
May 22nd, 2006, 04:18 AM
#3
Fanatic Member
Re: Inet stillexecuting issue
If u have got ur html text then u can use inet1.can. ahev u tried on error resume next or goto?
Dont rely only on your luck. Work hard until You get success.
vb Code:
Private sub Time_ispassing
While Me.Notgetsuccess
trygain=tryagain+1
Me.workhard
wend
end sub
-
May 22nd, 2006, 04:19 AM
#4
Fanatic Member
Re: Inet stillexecuting issue
If u have got ur html text then u can use inet1.cancel. have u tried on error resume next or goto?
Dont rely only on your luck. Work hard until You get success.
vb Code:
Private sub Time_ispassing
While Me.Notgetsuccess
trygain=tryagain+1
Me.workhard
wend
end sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|