James
asked on
Simulating UNC paths when linking to tables
I have an Access 2010 database that is divided into a front-end .accde and a back-end .accdb. All the tables are in the back-end and the front-end links to them.
My client is wondering if we can use UNC paths to point to the back-end database so that he doesn't have to map a network drive on the end-user PC's.
My problem is that I'm not sure how to handle this with regards to my development system. Right now, we're using mapped drives so I have the same drive letter mapped on my development system on my network. Then when I put a new front-end on the client's server, the links work fine. But if we switch to UNC, I'll have the problem that the computer name of the server on the client's network isn't the computer name of the server on our development network.
What's the best way to handle this? Do I need to add code to relink the tables (if necessary) on boot?
James
My client is wondering if we can use UNC paths to point to the back-end database so that he doesn't have to map a network drive on the end-user PC's.
My problem is that I'm not sure how to handle this with regards to my development system. Right now, we're using mapped drives so I have the same drive letter mapped on my development system on my network. Then when I put a new front-end on the client's server, the links work fine. But if we switch to UNC, I'll have the problem that the computer name of the server on the client's network isn't the computer name of the server on our development network.
What's the best way to handle this? Do I need to add code to relink the tables (if necessary) on boot?
James
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Dulton,
Your suggestion seems pretty workable. But I'm running into a bit of a problem.
I do my development in the development environment on my PC. Then I create the .accde which I copy to the client's server.
At what point do I use the admin function to change the linking? If I do it on my PC, then it fails because it can't see the UNC on the client's server. Do I have to find a way to invoke the link changing function after I've copied the .accde to the client's server?
James
Your suggestion seems pretty workable. But I'm running into a bit of a problem.
I do my development in the development environment on my PC. Then I create the .accde which I copy to the client's server.
At what point do I use the admin function to change the linking? If I do it on my PC, then it fails because it can't see the UNC on the client's server. Do I have to find a way to invoke the link changing function after I've copied the .accde to the client's server?
James
Yes, you've hit the nail on the head. You can't run the job until you're in the destination environment. Which, if you're doing it in an .accde, you'll probabaly have to expose something to call the routine.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Ask the client to map that drive. It's really a non-issue and - as you have seen - will remove a lot of trouble and various work-arounds.
If the users "happen" to delete mapped drives, supply a logon script or command file.
For a logon.cmd command file, it's one line of code:
net use g: \\servername\foldername password /user:username /persistent:yes
/gustav
If the users "happen" to delete mapped drives, supply a logon script or command file.
For a logon.cmd command file, it's one line of code:
net use g: \\servername\foldername password /user:username /persistent:yes
/gustav
Ask the client to map that drive. It's really a non-issue and - as you have seen - will remove a lot of trouble and various work-arounds.
If the users "happen" to delete mapped drives, supply a logon script or command file.
For a logon.cmd command file, it's one line of code:
net use g: \\servername\foldername password /user:username /persistent:yes
/gustav
If the users "happen" to delete mapped drives, supply a logon script or command file.
For a logon.cmd command file, it's one line of code:
net use g: \\servername\foldername password /user:username /persistent:yes
/gustav
Sorry for the multiple posts. The site stopped responding.
Gus,
Mapping the drive is not possible in a lot of companies. They may already have many drives mapped and all your users may not have the same drive letter available. If they can't all use the same drive letter, then each user needs to be able to do his own relinking which we usually want to avoid. The safest option is to distribute the FE already linked to the shared BE.
James,
You don't actually need to see the drive to map it. Just type/paste in the unc path. You do have to have access to the drive to complete the linking though so you can't do it from your own environment. The FE does need to be on the client's network when the link happens.
Pat
Mapping the drive is not possible in a lot of companies. They may already have many drives mapped and all your users may not have the same drive letter available. If they can't all use the same drive letter, then each user needs to be able to do his own relinking which we usually want to avoid. The safest option is to distribute the FE already linked to the shared BE.
James,
You don't actually need to see the drive to map it. Just type/paste in the unc path. You do have to have access to the drive to complete the linking though so you can't do it from your own environment. The FE does need to be on the client's network when the link happens.
Pat
They may already have many drives mapped and all your users may not have the same drive letter available. If they can't all use the same drive letter, then each user needs to be able to do his own relinking ..I have heard this before but in my 28 years in business (since 10-Net, PC-LAN, 3Com 3+Share, and Novell NetWare 2.0) I've never met a client where this little piece of order in chaos couldn't be established at little efforts. After all, most managers look for efficiency, and having the users freed from bothering with drive mappings is one step.
/gustav
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I've never met a client where this little piece of order in chaos couldn't be established at little effortsWelcome to my world. Large companies are more likely to have a problem since they have more servers and more defined shares. Even then you don't always run into a problem. Usually it happens when someone on the team has some cross-over function that causes him to have to interact with several departments.
ASKER
Thanks to everyone who answered. I appreciate the variety of thoughts.
James
James
Highly recommended.
mx