Solved

Visual Basic File Open Time Out Settings

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

930 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

20 Experts available now in Live!

Get 1:1 Help Now