Results 1 to 4 of 4

Thread: Inet stillexecuting issue

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2000
    Location
    Gloucestershire, England
    Posts
    301

    Angry 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:
    1. 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:
    1. While Inet1.StillExecuting
    2.    DoEvents
    3. Wend

    to prevent this error, even though I don't understand why its occuring!

    Also could I change it do this?

    VB Code:
    1. While Inet1.StillExecuting
    2.    Inet1.Cancel
    3.    DoEvents
    4. Wend

    would this be better than the above code as it will attempt to cancel the operation rather than wait?

    Thanks

  2. #2
    Fanatic Member vivek_master146's Avatar
    Join Date
    Apr 2006
    Location
    Delhi,India
    Posts
    787

    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:
    1. Private sub Time_ispassing
    2. While Me.Notgetsuccess
    3. trygain=tryagain+1
    4. Me.workhard
    5. wend
    6. end sub

  3. #3
    Fanatic Member vivek_master146's Avatar
    Join Date
    Apr 2006
    Location
    Delhi,India
    Posts
    787

    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:
    1. Private sub Time_ispassing
    2. While Me.Notgetsuccess
    3. trygain=tryagain+1
    4. Me.workhard
    5. wend
    6. end sub

  4. #4
    Fanatic Member vivek_master146's Avatar
    Join Date
    Apr 2006
    Location
    Delhi,India
    Posts
    787

    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:
    1. Private sub Time_ispassing
    2. While Me.Notgetsuccess
    3. trygain=tryagain+1
    4. Me.workhard
    5. wend
    6. 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
  •  



Click Here to Expand Forum to Full Width