John,
I ran your code, making changes for a remote server, and got the same result - 25 seconds to connect. This is the first time that VFP has every let me down in terms of speed. Delphi connects in < 1 second. What's going on here?
A problem is a problem only as long as it has a possible solution. Lacking that, it becomes a FACT!