Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Member BODY does not evaluate to an object
Message
De
19/06/2010 10:31:40
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Member BODY does not evaluate to an object
Divers
Thread ID:
01469737
Message ID:
01469737
Vues:
225
I am attempting to determine the IP Address programatically. I have applied the following code:
Declare Integer InternetCheckConnection In Wininet.Dll String Url, Long dwFlags, Long Reserved
lcURL = "http://www.yahoo.com"
If InternetCheckConnection(lcURL, 1, 0) = 0
	gcConnectionStatus = 'Not connected'
	gcIPAddress = 'Not Connected'
Else
	gcConnectionStatus = 'Yes, connected'
	ox = Createobject('internetexplorer.application')
	ox.navigate2("whatismyip.org")
	N = 0
	Do While ox.busy
		N = N + 1
	Enddo
	If Type("ox") = "O"
		odoc = ox.Document
		gcIPAddress = odoc.Body.InnerText
	Endif

	If  Substr(gcIPAddress,1,15) = 'The page cannot'
		ox = Createobject('internetexplorer.application')
		ox.navigate2("http://www.whatismyipaddress.com")
		N = 0
		Do While ox.busy
			N = N + 1
			
		Enddo



		If Type("ox") = "O"
			odoc = ox.Document
			WAIT WINDOW odoc.Body.InnerText
			gcIPAddress = odoc.Body.InnerText
		Endif
	Endif
Endif
At times I get a system error "Member BODY does not evaluate to an object"

What error handling routine can I use to ignore the error and return .null.?

Thanks to all,

dg
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform