Solved

Maintain connection to mapped drive with vb program on client

Posted on 2008-06-23
8
383 Views
Last Modified: 2010-04-21
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.
0
Comment
Question by:green_thumb_98
  • 4
  • 3
8 Comments
 
LVL 23

Expert Comment

by:Christopher Kile
ID: 21848149
Have you tried opening a file then leaving it open until you have finished the processing you need to do?
0
 

Author Comment

by:green_thumb_98
ID: 21848204
Could you elaborate?
0
 
LVL 23

Expert Comment

by:Christopher Kile
ID: 21848939
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.
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 23

Expert Comment

by:Christopher Kile
ID: 22262340
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?
0
 

Author Comment

by:green_thumb_98
ID: 22278425
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.
0
 
LVL 23

Accepted Solution

by:
Christopher Kile earned 500 total points
ID: 22280196
>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.

http://support.microsoft.com/kb/138365/EN-US/
http://support.microsoft.com/kb/297684

These two links document the LAN Autodisconnect feature.  The default disconnect time is 15 minutes, so you should be running your "shoe in the door" every 5-10 minutes.  But with the info you've given me, I can't really tell what tests you've run.  Have you tried writing text every 10 minutes? 5 minutes? 30 seconds?  When did autodisconnect kick in?  At some frequency of write-to-file, you will stay connected;  at worst, if you maintain an open file constantly, you will constantly have the connection.

If you have specific test data that contradict this (you ran the write-to-file and it timed out in X minutes which was less than the default 15 minutes and is less than the time your network administrator set for LAN Autodisconnect (if the admin set it, that is) on the server containing the mapped share), then I withdraw my objection and refer you to MS Technical Support; otherwise, I respectfully request you assign me a grade or ask the moderator to leave this question open.
0
 

Author Closing Comment

by:green_thumb_98
ID: 31469812
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.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

822 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question