Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copying text files to a remotes sql server

Status
Not open for further replies.

LeonAtRC

Programmer
Nov 25, 2002
101
0
0
US
Not sure if this is the right forum but I'm programming in Access ADP.
My program can use SQL Servers that are either on the local machine, on a server on the local network or a remote machine through an IP address.
I need to copy files from the applications machine to the sql server machine.
If the server is remote I'll FTP through the IP address.
If the server is on the local net I'll use a UNC path to copy the files.
If the server is on the application machine I'll use a simple copy command.
I test for a server being on the same machine as the app by looking at the computer name of both services.
But if I look at the computer name of the sql server I can't tell if the mahcine is remote or on the local net.

My question is how do I programmatically differentiate between a remote machine across the internet and a machines that is on the local net?
 
Never mind...I figured it out:
If the name of the server's "Data Source" is numeric then it's remote else it's on the net.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top