Printable Version of Topic

Click here to view this topic in its original format

UtterAccess Forums _ Access Security _ Mapping Network Drive To Be

Posted by: wheeledgoat Feb 26 2020, 08:44 AM

This is definitely outside the realm of Access, but fingers crossed someone has blazed this trail before...

Problem: Sometimes Access can't find the backend on launch. A red x appears over the network drive in Windows Explorer. As soon as you click on the drive in Windows Explorer, the red x goes away and then Access finds the backend.

I can't reproduce this, but it happens to someone in our office about once a week, resulting in me having to go over there and perform the above to get them connected.

Is there a way to have Access perform something that will "map" or activate the drive?

I'm developing a *.bat launcher (on the recommendation of another Access guru; ashamed I didn't think of it, what a great idea) so if there's a command line solution I can easily put it there...

Thanks!!

Posted by: DanielPineault Feb 26 2020, 09:03 AM

I've seen this.

Why not simply link to the back-end using IP UNC path?

Posted by: wheeledgoat Feb 26 2020, 09:26 AM

Thanks Daniel! I'll have to google what that means - 'UNC' is buried deep in my brain somewhere, behind lots of cobwebs. I think the last time I heard that term was... 20 years ago? But you think that'll do it, eh?

Further complicating the issue is some users have a different path to the same network. Both of these are valid and I have to juggle them with IF statements so it works for all users
G:\AMGS_AREAS\AMG-OncologyNorth\GDrive\Common\
G:\AMG-OncologyNorth\GDrive\Common\

Posted by: DanielPineault Feb 26 2020, 09:38 AM

By using IP UNC, it should be the same.

Posted by: shadow Feb 26 2020, 11:03 AM

I personally use mapped drives because I do the development on my own computer and then roll out the application to the client computer and the client usually uses a Runtime version. I've seen and used relinking applications but did not have much success. (The one I tried using was the J street relinker but it took a LONG time to relink.) When I use a mapped drive no relinking is necessary and the application is ready to go after my batch file:

- maps the drive to the UNC
- copies a copy from the server to the local hard drive
- launches the application

The whole process might take 3 or 4 seconds. This also allows me to account for different computers referencing the server differently for whatever reason. I just need to tweak up one line in the batch file for that computer.

I've seen the annoying red X and there are two causes that I've found. There may be more.
- In a peer to peer situation (e.g. the "server" is actually the receptionist's workstation and the other users are acting as clients), if the receptionist turns on her computer before the clients do, Windows will sometimes not map the drive with startup (as it is not available) and not do so until you click the drive.
- I think Windows by default has a power setting on LAN cards to disconnect when idle. You can check that from Device Manager > Network Adapters find your LAN card and click properties > Power Management tab. I've seen it checked on to disconnect and then when it reconnects, you need to click the path to get it active again. I usually turn that setting off when I see this happen.

I can't promise that this is the problem but this is what I've encountered.

As far as the line of the batch file that does the mapping, here's what I use:

CODE
net use z: \\SERVERNAME\FOLDERNAME /persistent:yes


I hope this helps someone.

Posted by: wheeledgoat Feb 26 2020, 12:42 PM

Brilliant! thanks very much. between daniel prompting me to get back up to speed with UNC addresses and shadow's understanding of the problem and advice for the batch file, I'm all set.

greatly appreciate it folks!!! uarulez2.gif

Posted by: shadow Feb 26 2020, 01:00 PM

You're welcome.

I reread my post and it was supposed to say "...after" rather than "before". I don't see any way to edit posts so I hope people understand what I meant from the context.

Posted by: wheeledgoat Feb 26 2020, 01:26 PM

You should see an EDIT button next to the REPLY button, all the way on the right below your post... (so long as you're logged in). Anyhoo, I understood what you meant. Thanks again!

Posted by: shadow Feb 26 2020, 01:57 PM

I logged out and in (just in case) and the Edit button is definitely not there... smile.gif

And there's no question that I'm logged in or it would be difficult to post laugh.gif

Posted by: wheeledgoat Feb 27 2020, 08:19 AM

wow, now the EDIT button is gone for me! i tried logging out and back in too. oooOOOOOooooo lol

EDIT: but the EDIT button is visible for this post I just made. I wonder if there's a timer (or maybe view counter) on it, so users can't go back and change posts that are old or already viewed?

Posted by: theDBguy Feb 27 2020, 10:42 AM

Hi. I believe it's time based. I don't recall how much time though.