UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Mapping Network Drive To Be, Access 2016    
 
   
wheeledgoat
post Feb 26 2020, 08:44 AM
Post#1



Posts: 109
Joined: 18-December 18



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!!

--------------------
"If you don't make mistakes, you're not working on hard enough problems." -Frank Wilczek

"Success is getting what you want. Happiness is wanting what you get." -B.R. Hayden

Virtue is sufficient for happiness, therefore a sage is immune to misfortune.
Go to the top of the page
 
DanielPineault
post Feb 26 2020, 09:03 AM
Post#2


UtterAccess VIP
Posts: 7,376
Joined: 30-June 11



I've seen this.

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

--------------------
Daniel Pineault (2010-2020 Microsoft MVP, UA VIP, EE Distinguished Expert 2018)
Professional Help: https://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: https://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...(you are responsible for your choices and actions)
Go to the top of the page
 
wheeledgoat
post Feb 26 2020, 09:26 AM
Post#3



Posts: 109
Joined: 18-December 18



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\

--------------------
"If you don't make mistakes, you're not working on hard enough problems." -Frank Wilczek

"Success is getting what you want. Happiness is wanting what you get." -B.R. Hayden

Virtue is sufficient for happiness, therefore a sage is immune to misfortune.
Go to the top of the page
 
DanielPineault
post Feb 26 2020, 09:38 AM
Post#4


UtterAccess VIP
Posts: 7,376
Joined: 30-June 11



By using IP UNC, it should be the same.

--------------------
Daniel Pineault (2010-2020 Microsoft MVP, UA VIP, EE Distinguished Expert 2018)
Professional Help: https://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: https://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...(you are responsible for your choices and actions)
Go to the top of the page
 
shadow
post Feb 26 2020, 11:03 AM
Post#5



Posts: 307
Joined: 19-April 04
From: Toronto


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.
Go to the top of the page
 
wheeledgoat
post Feb 26 2020, 12:42 PM
Post#6



Posts: 109
Joined: 18-December 18



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

--------------------
"If you don't make mistakes, you're not working on hard enough problems." -Frank Wilczek

"Success is getting what you want. Happiness is wanting what you get." -B.R. Hayden

Virtue is sufficient for happiness, therefore a sage is immune to misfortune.
Go to the top of the page
 
shadow
post Feb 26 2020, 01:00 PM
Post#7



Posts: 307
Joined: 19-April 04
From: Toronto


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.
Go to the top of the page
 
wheeledgoat
post Feb 26 2020, 01:26 PM
Post#8



Posts: 109
Joined: 18-December 18



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!

--------------------
"If you don't make mistakes, you're not working on hard enough problems." -Frank Wilczek

"Success is getting what you want. Happiness is wanting what you get." -B.R. Hayden

Virtue is sufficient for happiness, therefore a sage is immune to misfortune.
Go to the top of the page
 
shadow
post Feb 26 2020, 01:57 PM
Post#9



Posts: 307
Joined: 19-April 04
From: Toronto


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
Go to the top of the page
 
wheeledgoat
post Feb 27 2020, 08:19 AM
Post#10



Posts: 109
Joined: 18-December 18



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?
This post has been edited by wheeledgoat: Feb 27 2020, 08:20 AM

--------------------
"If you don't make mistakes, you're not working on hard enough problems." -Frank Wilczek

"Success is getting what you want. Happiness is wanting what you get." -B.R. Hayden

Virtue is sufficient for happiness, therefore a sage is immune to misfortune.
Go to the top of the page
 
theDBguy
post Feb 27 2020, 10:42 AM
Post#11


UA Moderator
Posts: 78,448
Joined: 19-June 07
From: SunnySandyEggo


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

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    6th July 2020 - 07:09 AM