General information
Category:
COM/DCOM and OLE Automation
Title:
Fatal Error in InternetExplorer For Each Loop
I am controlling an instance of InternetExplorer from inside VFP6. I have a simple program designed to get me a list of all the links on a designated web site. After navigating to the site and checking my readystates, I just have a simple section of code to get the list of links and save them to a database. The code looks like this:
FOR EACH oLink IN oIEobj.Document.Links
REPLACE linktext WITH oLink.InnerText
REPLACE linkurl WITH oLink.HREF
ENDFOR
On most web sites, it works fine, but on a few I get a FATAL EXCEPTION ERROR COOOO5, and the whole thing crashes out to the OS. On the web sites that crash the program, I can even rem out the two REPLACE lines and it still crashes (giving me the same error with the line number of the ENDFOR command). Has anyone experienced this and is there a fix?
Thanks in advance
John Dennis
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only