Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Problem reading from text file


Message #1 by Brian Walk <walkbk@e...> on Thu, 12 Jul 2001 08:16:04 -0700 (PDT)
I looked at it and you were right there are certain questions that are not
always answered! Since they are coming out of a propertybag and being
assigned to a udt they were keeping the buffer not spaces! Thanks for the
help!!!

On Thu, 12 Jul 2001 09:45:41 -0700, professional vb wrote:

>  Brian,
>  
>  can you post a sample of the text file showing us which spaces are
missing?
>  It is possible that what you think are spaces in reality are not
printable
>  characters, that notepad converts to blanks when saves the file.
>  
>  m.
>  
>  
>  > -----Original Message-----
>  > From:	Brian Walk [SMTP:walkbk@e...]
>  > Sent:	Thursday, July 12, 2001 8:16 AM
>  > To:	professional vb
>  > Subject:	[pro_vb] Problem reading from text file
>  > 
>  > I write a string to a text file that contains a header, body and
trailer.
>  > The header, body and trailer are each 1812 characters long and have a
>  > carriage return and line feed at the end of each section. There can be
>  > multiple body sections between the header and trailer.
>  > These are in a format specified by the feds. The header starts with an
>  > "A0"
>  > , the body starts with "B0" and the trailer a "Z0". 
>  > 
>  > Now my problem!
>  > 
>  > I open this file in code to analyze the information. Once I have it
open I
>  > loop through it pulling line by line. This pulls each section as one
line
>  > because of the CRLF. The problem is that some of the spaces in the each
>  > line
>  > disappear. I can't have anything missing because these are answers to
>  > certain questions I have asked. The strange thing is that if I open
this
>  > text file in Notepad and the save it, then run my program the sections
all
>  > pull right.
>  > 
>  > Does anyone have any idea what is going on?
>  > 
>  > 
>  > I have used the "Open filename for Input/Output as filenumber" and
>  > FileSystemObject for reading and writing and it always does the same
>  > thing. 


  Return to Index