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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

link to another database using IP address instead of "C/:filename"

Status
Not open for further replies.

chiefvj

Technical User
Feb 4, 2005
73
US
Please...I would like to use VBA to link to a Database on a network computer using the IP address or its URL.
thank in advance.

 
I don't know how you would do that; you should be able to set up a file or system DSN and use it in an ODBC connection.

Cogito eggo sum – I think, therefore I am a waffle.
 
What kind of database is it? MS SQL Server, MS Access, Oracle...? Do you have permissions to do the connection? Have you tried looking at different connection strings, and how to obtain the correct info?

--

"If to err is human, then I must be some kind of human!" -Me
 
I don't know what it is that you mean by link
but try that instead of c:\xxxx
use

\\servername\sharename\pathname\filename.mdb
or

\\ipaddress\servername\sharename\pathname\filename.mdb
ipaddress is like

192.168.1.1
 
I'm using an Access 2003 database. The frontend are running on local computers the tables are in a backend database residing on a server. Using Windows XP... I map each frontend computer to the server where the tables are residing. Then in Access I link the front end to the tables on the server. In the front end I run a fileexist function "S:\EmployeeTablesFolder\EmpTables.mdb"...etc..
I am wondering if I can use the IP address of the server instead of the Drive letter... which can change from computer to computer.
thanks
 
Follow PWise's solution - use a UNC pathname:

\\Server\Share\Databasename.mdb
or

\\ServerIP\Share\Databasename.mdb

or alternatively implement a login script for the network that forces everybody using your app to have the same drive letters. You can use such facilities for other applications as well.

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top