Solved

File IO

Posted on 2004-04-02
7
152 Views
Last Modified: 2010-05-02
What is the fastest method for accessing information within a file in Visual Basic.  I have tried various methods of opening a file but all of them are extremely slow across a network situation.  I have tried all of the vb calls that are built within.  Is there an api or any faster way to get at data within the files?  

0
Comment
Question by:JBlackham
7 Comments
 
LVL 11

Expert Comment

by:YohanShminge
ID: 10745347
You're not going to go any faster than your network will allow, no matter what method you choose.  Its going to be limited by the speed and traffic on your network.
0
 
LVL 15

Expert Comment

by:unknown_routine
ID: 10745381
Opening what file?
Answer depends on the file type.

and as mentioned above you also have network bottleneck and no matter you use VB or C++

it is there.


As a general rule if the file is a stand alone its better to copy the file to the local computer instead of working with
over the Network.




0
 
LVL 7

Expert Comment

by:Burbble
ID: 10746321
I don't know which you've tried, but I've found that using

Dim b() as Byte
Get #1, , b()

is much, much, much faster than using

b() = InputB(LOF(1), #1)

I'd say that as a rule, use the Binary Get/Put functions instead of the Input/InputB/Print functions whenever possible.

-Burbble
0
 
LVL 19

Expert Comment

by:BrianGEFF719
ID: 10747571
Maybe if you do the file copy accross the network in two steps

step 1) copy the data across the network store in memory
step 2) write the entire block of data to hard disk in 1 step.



just a suggestion.
Brian
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 11441136
PAQed - no points refunded (of 125)

modulo
Community Support Moderator
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Validating VB6 Function 19 65
passing parameter in sql procedure 9 65
Macro Excel - Multiple If conditions 2 81
Fastest way to find and count same items VB6 16 26
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 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…
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…

821 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