Link to home
Start Free TrialLog in
Avatar of Andy Brown
Andy BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Mimic UNC drive

Hi, I have an MS Access application that is about to be deployed on several sites.  

Historically, the old Access app used drive letters/folders (N:\FolderName\back-end.accdb etc.) to store the back-end with the front-end being deployed locally.  To mimic this on my test PC, I would simply create a folder on my D: drive, something like "D:\SiteName", and then map a drive letter to that folder using the "Subst" command.  Whilst this is not the most elegant solution, it worked well for several years and was very flexible.

However, I now wish to use UNC paths instead of drive mappings and need a way to set these paths on my test-bed.

Any ideas?
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

You can use UNC if you want for linking a table.

You can update by replacing the drive letter with:

\\Servername\ShareName

 In the tabldefs.connect property.

Jim.
Avatar of Andy Brown

ASKER

Hi Jim - thanks for that.

It's actually the Windows part and how I can tell windows that "\\Servername\ShareName" exists on my PC.
You would use windows explorer to browse to a network location.  You'll end up with:

\\Server name\Sharename

 You can also do (but not recommended):

\\ip address\Sharename

If you use the linked table manager, just tick the check box "always ask for location" and you can then type it in directly there as well if you don't refresh in code.

Jim.
OK - that sounds good.  The only problem, is that I currently don't know to map something like "D:\Test" to something like "\\TestServer\Client1"
There's something called the "Microsoft loopback adapter".  I'm going to take a look at that.
The only problem, is that I currently don't know to map something like "D:\Test" to something like "\\TestServer\Client1"

That's because you can't. You can map a drive letter - like D:  - that's it.

/gustav
<<The only problem, is that I currently don't know to map something like "D:\Test" to something like "\\TestServer\Client1">>

  If you want to map the drive, you need to open Windows Explorer and right click on "this PC", then map network drive.

 If you want to end up with UNC, then start with "Network". Browser to the server, then to the share.

 If you can't browse to the server, you can right click on "this PC", and choose "Add a network location".   You can setup a network location, FTP site, or web URL this way (Access can only use the network location and only if it's on the local LAN).

Jim.
ASKER CERTIFIED SOLUTION
Avatar of PatHartman
PatHartman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If you really need to "mimic" UNC, you can allow file sharing on your PC. Just use the Sharing Wizard via context menu on the test folder. Then you can use \\yourpc\yourshare\...
Thanks everyone for your help.