Hey,
I am reading a field from a binary file and this is how I retrieve it.
sTemp = System.Text.Encoding.ASCII.GetString(patbytes, 0, 64)
pat.FirstName = sTemp.Trim
patbytes contain 256 bytes which are a patient record.
The bytes i'm getting are the first name.
When I get the string, it is 64 chars long even after I trim it.
The 64 is the max # of characters, but that is never the case.
How can I retrieve just the name without the extra characters?
When I check stemp(20), it shows me nothing, so I do not understand why trim is not getting it done.
Thanks,




Reply With Quote