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

Database File Paths Nightmare!! 1

Status
Not open for further replies.

metalboy

Technical User
Apr 1, 2004
97
GB
I have a database which is stored in a particular file path on a shared drive. i want people to have acces to this database BUT! they have this file path stored as B: drive or X: drive where as when created i had it stored as N: drive.

When they try to open this database it says cannot find n:blah\blah\blah.

any help would be grateful

Regards

aLex
 
As a general rule, I always use UNC for referencing locations of files. It basically takes away the drive letter references.

For example,

H:\shared\Data
is really the same as the UNC reference...

\\companyserver\location\shared\Data
To see you unc references.. Go to DOS and type NET USE

htwh,

Steve Medvid
"IT Consultant & Web Master"

Chester County, PA Residents
Please Show Your Support...
 
Use "\\ServerName\Path\MyFolder\databasename.mdb" instead of declaring "N:\Myfolder\databasename.mdb
 
hi

thanks for that, but where do i enter that information??

regards

Alex
 
My suggestion is to create a short cut on everyone's desktop. You can mail out the link in an e-mail also and they can create their own short cut.

One caution is if they have different versions of MS Access on their PCs. Your short cut would need to reference the MS Access version then the UNC Path. For example:

C:\Program Files\MS Office\MSAccess.EXE "\\unc_Path_here\DatabaseNAMEHERE.MDB"

htwh

Steve Medvid
"IT Consultant & Web Master"

Chester County, PA Residents
Please Show Your Support...
 
How could I modify the above path examples to access files on another domain in my company's network? Thanks, Jimbo
 
Provided you have proper network permissions, you should be able to access files using the UNC Path naming conventions. One approach I've used is to Map a drive to the appropriate directory, then open a DOS Window and use the NET USE command to see the full path links.

Again, an example of UNC would be \\MyCompanyServer\MyLocation\DirectoryName\Sub-DirectoryName\FileName.mdb

\\AtlasDataServer\PA_Office\Shared\Data\MSAccess\Test.mdb

htwh,

Steve Medvid
"IT Consultant & Web Master"

Chester County, PA Residents
Please Show Your Support...
 
Steve:

Thanks for your help, but I am still not clear as to how to reference the foreign domain in the UNC. I am coding in VBA to create XLS files of Access data on a server in a domain other than the one I am logged into. So will I simply add domain to the beginning of the UNC? Such as -

\\Domain2\servername\serverroot\targetsubdirectory\test.xls?

I can browse to this directory by selecting the domain in explorer, but I can't map to it and then reference the mapping in my code unless my Access clients have the same mapping on their machines. So it would seem that your UNC way is best. I'll have to wait until tommorrow to try it out.
Thanks,
Jimbo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top