[AccessD] ping from access

MartyConnelly martyconnelly at shaw.ca
Mon Feb 14 16:10:26 CST 2005


Ahh you want the cmd window to remain open
to check the cmd options type cmd /? I believe cmd /c is the default and 
that closes the window on termination
So you want
shell( "cmd /K ping www.databaseadvisors.com" )
This will leave the cmd window open, so you can toddle over at your 
conveniance.
Anything longer than a one line command needs a .bat batch file and use 
of %1 %2 etc to handle input strings


If you want to do this by vba api code, uggh it is convoluted use 
winsock.ocx.
I can't remember there maybe license issues with winsock, need a copy of 
VB6 or something.
but you will get the responses returned and parsed.
See example
http://www.freevbcode.com/ShowCode.Asp?ID=199

John Clark wrote:

>Why do I need to pipe it? I'm not doubting that you are probably
>correct...I am just curious as to why. My ping runs, but it is
>minimized. I can switch over to that window real quick, but that really
>isn't very good. And, then it just disappears too.
>
>One of the things that I would like this to do is to simply check that
>the address is available, at least at a ping level. I was also hoping
>that I could connect to a telnet session for the chosen address, by
>clicking a button. This would give me an outlet for all else that I
>need...I think.
>
>Thanks for the help so far!
>
>John W Clark
>
>  
>
>>>>martyconnelly at shaw.ca 2/11/2005 3:04 PM >>>
>>>>        
>>>>
>You might want to direct to a file for output although there maybe a 15
>
>second delay if unreachable
>like so
>ping 207.46.245.230 > "c:\temp2\pingtest.txt"
>
>It depends on what info you need returned.
>
>John Clark wrote:
>
>  
>
>>I want the ability to ping an IP address from access, and from there
>>I'll see what I can do with it. I figured I could do something like:
>>
>>
>>dim IPAddress as String
>>
>>IPAddress = "ping " & txtIP.value
>>Shell(IPAddress)
>>
>>Am I on the right track?
>>
>>I am juggling about 20 things, and doing this in between, so my brain
>>power to project ratio is depleted a bit.
>> 
>>
>>    
>>
>
>  
>

-- 
Marty Connelly
Victoria, B.C.
Canada






More information about the AccessD mailing list