Link to home
Start Free TrialLog in
Avatar of green_thumb_98
green_thumb_98

asked on

Maintain connection to mapped drive with vb program on client

If this mapped drive is not accessed in 15 minutes it loses it's connection so when opening files on this drive there is a delay while it reconnects.  I wrote vb code to go write to a text file on the mapped drive hoping that would maintain the connection.  However, that doesn't seem to work.  Any suggestions?  I don't want to change the registry, I'm looking for something i can run on the client.
Avatar of Christopher Kile
Christopher Kile
Flag of United States of America image

Have you tried opening a file then leaving it open until you have finished the processing you need to do?
Avatar of green_thumb_98
green_thumb_98

ASKER

Could you elaborate?
It's difficult to elaborate when I don't understand exactly what you're doing, but I'll try.


With inline code:

Open text file
do whatever else you want to do
close text file

When you're running something else

build a small VB program that opens a text file in the Form_Load event, then close the file in the Form_Unload event.  Open this program before running anything else, close it when you're done.
green_thumb_98,

You never responded with feedback of any sort to my last message.  Were you able to resolve this problem, and if so, how?
I've kind of put this issue on the back burner.  However, I'm not sure I was completly clear about my problem.  I need something that will run every 15-20 minutes that will keep the shared drive connection while it is not being used.  I have tried writing to a text file and that doesn't seem to work.
ASKER CERTIFIED SOLUTION
Avatar of Christopher Kile
Christopher Kile
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
Thank you for yor effort.  Here's how I tested my program.  I accessed my share drive, closed it, and waited 7 minutes.  I then ran my program that writes to the text file.  I then waited another 10 minutes.  I then tried to open the share drive again and I still had the delay.  I checked the text file on the drive and it had been written to.  Oh well...  Thanks again for your help.  At the moment this is really low on my list of priorities anyway.  Thanks.