Solved

Maintain connection to mapped drive with vb program on client

Posted on 2008-06-23
8
379 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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

DevOps Toolchain Recommendations

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

Question has a verified solution.

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

This is about my first experience with programming Arduino.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
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 …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

929 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now