|
-
Feb 23rd, 2001, 11:29 AM
#1
Thread Starter
Addicted Member
Dear Friends,
Long time no see. greetings.
I wish to ask a stupid question but I really don't know. Is it the following statement can read the whole file into the string variable Buffer?
Dim buffer as string
Open "c:\temp.txt" For Binary As 1
Get #1,,Buffer
Close 1
By the way, if I wish to set the file pointer to the start, is it the following?
Seek #iFileHandle, 1
Thanks a lot.
-
Feb 23rd, 2001, 11:35 AM
#2
Retired VBF Adm1nistrator
Code:
Dim buffer as string
Open "c:\temp.txt" For Binary As #1
Get #1,,Buffer
Close 1
That will read in the whole file yes.
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Feb 23rd, 2001, 11:49 AM
#3
_______
<?>
Dim buffer as string
Open "c:\temp.txt" For Binary As 1
Get #1,,Buffer
Close 1
'to answer your own question
Debug.Print Buffer
and see what you get.
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Feb 23rd, 2001, 11:53 AM
#4
Thread Starter
Addicted Member
Afraid of Overflow or Slow System Response
In fact, I will download some data from the Web. If the data size can be up to 2M or so but I just append the data to a string, will this cause problems to my program.
BufferString=BufferString+ReceivedData
If I run the "Replace" function on such a big string, will it OK?
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
|