>Thanks again! But it still does not distinguish if your accessing data over a LAN or WAN.
To build on George's answer, why do you need to do this? Usually this is something you need to know in advance, so you know how to structure your application.
Theoretically, you could use low level file functions and write an incompressible file of a known size (say, a 50KB file of random characters) to the drive in question. If it took 8 or more seconds, it's likely dial-up; it will take less time with faster connections. You'd have to account for ISDN, various flavours of DSL, cable modem, satellite, etc.
One potential fly in the ointment for this approach is that the network client might cache the file and invalidate timing results. You'd have to experiment and check.
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up