Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Maintain connection to mapped drive with vb program on client

Posted on 2008-06-23
8
Medium Priority
?
391 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Tutorials alone can't teach real engineering

So we built better training tools.

-Hands-on Labs
-Instructor Mentoring
-Scenario-Based Tests
-Dedicated Cloud Servers

All at your fingertips. What are you waiting for?

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

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

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

We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
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 …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

730 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