Solved

Visual Basic File Open Time Out Settings

Posted on 2004-09-21
2
696 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

749 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