Groups | Blog | Home
all groups > vb.net > january 2007 >

vb.net : Binary Reader and DBF files


JimmyKoolPantz
1/17/2007 7:35:03 PM
I came across a problem today and I'm not sure what my possible
solutions are. The situation is I am am using a binary reader to read
data from a filestream. The data source is a dbf file.

While reading characters from the stream, I came across a problem. The
problem is "Prot=E9G=E9" . This is a persons name in one of the fields,
and when reading characters, it basically skips the e's and grabs 2
bytes from the next field. Which throws everything else off by two.

Ayone have any solutions?

Just incase you need to know, am using
binaryreader.ReadChars(Field_Lenght). Wen it reads "Prot=E9G=E9" its not
reading the e's. So instead of reading 7characters its only reading 5
and grabing 2 characters from the next field.
Rick
1/18/2007 6:20:35 AM
Can you specify the encoding of the stream?

Rick


[quoted text, click to view]
I came across a problem today and I'm not sure what my possible
solutions are. The situation is I am am using a binary reader to read
data from a filestream. The data source is a dbf file.

While reading characters from the stream, I came across a problem. The
problem is "ProtéGé" . This is a persons name in one of the fields,
and when reading characters, it basically skips the e's and grabs 2
bytes from the next field. Which throws everything else off by two.

Ayone have any solutions?

Just incase you need to know, am using
binaryreader.ReadChars(Field_Lenght). Wen it reads "ProtéGé" its not
reading the e's. So instead of reading 7characters its only reading 5
and grabing 2 characters from the next field.

JimmyKoolPantz
1/23/2007 10:26:45 AM
Sorry, for the slight delay. The following is the declaration for the
encoding of the stream.

Dim encoding As New System.Text.ASCIIEncoding

Mike

[quoted text, click to view]
AddThis Social Bookmark Button