network drives

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am accessing a database over a network. The database resides on machine A, I am accessing it on machine B. The database needs to interogate a file located on machine A, the same machine and drive on which it resides. Could anyone tell me if it is possible, once the database is open, to obtain the full path to the database within my program? I can then use that to point to the file. Obviously I know the path but I dont want to hard program it, because the location of the database (and the file) may be changed at some point.
 
currentdb.Name will give you the full path to the current database. On my PC the result from the immediate window is:

print currentdb.Name
C:\Data\UsefulDatabases\Collections\CollectionsWithCmnDlgAPI2002.mdb

You can parse the string to extract just the path.
 
Back
Top