1. Thierry Garrigues
  2. PowerBuilder
  3. Thursday, 11 January 2024 15:39 PM UTC

Hi.

We use the Inet object to find out if the application has access to the Internet:

inet ln_inet
if getContextService("Internet", ln_inet ) = -1 then return -1

In PowerBuilder 2022r3, what do you recommend I use to replace this code?

Thanks

 

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 11 January 2024 16:02 PM UTC
  2. PowerBuilder
  3. # 1

Hi Thierry;

  There is no reason to replace that code as both the iNET object and the GetContextXxxxxx() commands are still valid. The only restriction is that they are not being enhanced but, still good for your App(s) use in this aspect.  HTH   ;-)

Regards .. Chris

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Thursday, 11 January 2024 19:08 PM UTC
  2. PowerBuilder
  3. # 2

You could use the HttpClient object to get the Google home page. The SendRequest function will return -3 if there is no internet.

 

 
Comment
  1. Armeen Mazda @Appeon
  2. Friday, 12 January 2024 16:49 PM UTC
What's good about Roalnd's suggestion is that you are not using an obsolete feature that in near future you will need to rewrite anyway. Might as well clean up the code now if it is not a lot of effort.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.