Results 1 to 4 of 4

Thread: Ping (2000)

  1. #1
    3 Star Lounger
    Join Date
    Sep 2002
    Location
    London, England
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Ping (2000)

    Can I ping an IP address from within Access?

    Ian

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: Ping (2000)

    You can use Shell to call ping, and relay the output to a text file. You can then use the the old Basic instructions Open, Line Input etc. to read the text file, or use Scripting.FileSystemObject.

    Shell "cmd /c ping 123.124.125.126 > Cing.txt"

    or

    Shell "cmd /c ping www.wopr.com > Cing.txt"

  3. #3
    3 Star Lounger
    Join Date
    Sep 2002
    Location
    London, England
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Ping (2000)

    Edited by HansV to make URL clickable - see <!help=19>Help 19<!/help>

    That was my fallback position. I think there may be a way of doing it using API calls though. I found an article called 'Ping with VB the easiest way using IPHLP.API' on http://www.freevbcode.com/ShowCode.asp?ID=4945. I copied the code into an Access module, and it runs, but it gives false negatives, claiming to have failed on IP addresses that I know I can ping from the cmd window. Unfortunately I can't work out why because the code is based around two API calls, and even if I could understand what was going on inside them, the de###### won't take me there. I wondered if anybody had seen any other API calling code that might do a similar job?

    Ian

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •