3 Replies - 356 Views - Last Post: 01 October 2018 - 09:28 AM Rate Topic: -----

#1 dg6yhw11   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 09-July 12

How can I test for an active internet connection using VB6

Posted 06 September 2018 - 03:21 PM

My program needs to connect to a remote SQL server.
I have several thousand users scattered around the country.
I use the standard VB6 code discussed many time in this forum.
Most of the time the connections succeed but at other times the ADO connection fails, then loops twice trying to connect before finally failing for good.
My users obviously can't tell me much but I suspect that their internet connection is down.
Is there a way to test for an active internet connection from within a VB6 program?
Thank you.
Murray

Is This A Good Question/Topic? 0
  • +

Replies To: How can I test for an active internet connection using VB6

#2 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14691
  • View blog
  • Posts: 58,720
  • Joined: 12-June 08

Re: How can I test for an active internet connection using VB6

Posted 06 September 2018 - 03:53 PM

Maybe use 'ping'?
Was This Post Helpful? 0
  • +
  • -

#3 dg6yhw11   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 09-July 12

Re: How can I test for an active internet connection using VB6

Posted 06 September 2018 - 04:07 PM

View Postmodi123_1, on 06 September 2018 - 03:53 PM, said:

Maybe use 'ping'?

I thought of that but there isn't a clean way to ping from within a program. I would have to shell to cmd then capture the answer in a file, read it, etc, etc.. I think its too messy.
But thank you for your answer.
Was This Post Helpful? 0
  • +
  • -

#4 akunguti   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 06-July 17

Re: How can I test for an active internet connection using VB6

Posted 01 October 2018 - 09:28 AM

try windows api https://msdn.microso...y/ms909414.aspx
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1