FoxPro Programming
Re: Foxbase .BIN file to ping an IP?
10/05/2008
05:11:58 PM
2HB10V4UJ Show this entire thread in new window
From:
Doug Dodge
To:
Bob
Attachments:
None
Bob,

That was about what I had expected to hear and not surprised that you have taken the approach you have, since FoxBase's capabilities were much less robust than today's product.

I don't think there will be anything for Foxbase directly simply because at that time the Internet wasn't even around yet in any real sense - so no need for a BIN file to ping anything. *g* All we were concerned about back then was running on Novell networks. *s*

There would be two approaches I would take at this juncture.

1. Find an old SDK for FoxBase and a C compiler that would work with it. I don't recall off the top of my head but the developers used a non-Microsoft compiler - just don't remember what it's name is right now.

2. The other approach would be to send Calvin Hsia an email about this. He may know of a BIN file you could use or of someone who could write one. Given his perspective into the community he might know of someone and he's a great guy and totally approachable.

Hope that helps.

Best,

DD

Thanks, Doug,

Yes, I already have an IPCHECK.PRG UDF that uses the "!PING 192.168.1.10 > result.txt" type of DOS redirect command (under Foxbase) to create output to a text file. I was hoping for a more independent .BIN implementation that would not require that data files be employed and would run under Foxbase. Unfortunately, in Foxbase, filetostr() is not an available function so a DBF must be opened and appended to (with type sdf) to capture the text file's contents. Then these contents (now in the DBF) can be explored. Again, I was trying to find a more independent approach that uses the LOAD and CALL commands in Foxbase 2.1 (since that is the language I'm stuck with in this case). Maybe there is no such animal...?

Thanks for the thought,
Bob


Bob,

In VPF I'd do the following;

lcIP = [the DNS entry or IP address - e.g. 'www . yahoo . com'] (minus spaces *g*)

lcCmd [run ping ] + lcIP + [ > results.txt]
&lcCmd

Then (again in VFP) lcVar = FILETOSTR('results.txt') and you will have some information you can parse.

Remember, DOS has the ability to pipe the output of a command.

You just need to adapt the above to the more limited Foxbase command set.

Best,

DD

I know this is off-topic but I still need to use Foxbase sometimes and thought someone using this forum might have a suggestion for me. I'm looking for a binary code file to LOAD and CALL (from within Foxbase 2.1) that will allow me to get a result similar to the DOS PING command. Was hoping there might be some sort of download library I might be able to tap. Thanks.