Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Member BODY does not evaluate to an object
Message
From
19/06/2010 10:42:40
 
 
To
19/06/2010 10:31:40
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01469737
Message ID:
01469739
Views:
57
Check Message ID: 1452490

>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform