|
-
Nov 6th, 2000, 09:41 AM
#1
Thread Starter
Lively Member
I have a vb application that will go out and read a log\txt file sitting on a remote server. The file size is approximately 500 bytes so it is relatively small. The problem I am having is that it can take in upwards of 1 minute to read line by line of the file and return it back to a vb window on the client. My question is how can I speed this process up. Here is my code below:
CommonDialog.FileName = "\\<unc file path>\log.txt"
Open CommonDialog.FileName For Input As #1
Do Until EOF(1)
Line Input #1, LineOfText$
AllText$ = AllText$ & LineOfText$ & Wrap$
Loop
txtLog.Text = AllText$
Any suggestions would be greatly appreciated!
-
Nov 6th, 2000, 10:01 AM
#2
Lively Member
Can't you make a copy of the file, save it in the windows temp folder locally and read it from there instead ?
-
Nov 6th, 2000, 10:03 AM
#3
Fanatic Member
Read the data into an array and do the string manipulation after you have closed the file, also you may want to use INPUT# since this reads a line at a time into a variable instead of a character at a time (as LINE INPUT does)
Cheers,
Paul.
Not nearly so tired now...
Haven't been around much so be gentle...
-
Nov 6th, 2000, 10:14 AM
#4
Frenzied Member
Open the file for binary, it's much faster... check out the File tutorial on kedaman's hp (www.kedaman.com), it helped me alot!
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|