Solved

Visual Basic File Open Time Out Settings

Posted on 2004-09-21
2
697 Views
Last Modified: 2013-11-25
Good morning all
Is there a setting I can increase to see how long VB ( and .NET ) wait before they fail when trying to create a file. It seems to be about 5 seconds at the present.

Open "\\NEWTON\C$\TESTFILE" For Output As #1

If the server is very busy eg many reports running, the above line fails ( VB and .NET)

Thanks in advance
0
Comment
Question by:parkerig
[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
2 Comments
 
LVL 5

Accepted Solution

by:
brianb99999 earned 50 total points
ID: 12118843
Try putting a doevents in before you perform the open?
0
 
LVL 19

Assisted Solution

by:BrianGEFF719
BrianGEFF719 earned 50 total points
ID: 12119686
i think you might want to try using CreateFileEx() API instead of using VB's native OPEN function. The reason for this is, i belive that you can adjust the time out and have a little more control over the file open command.

-Brian
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

710 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