|
-
Nov 1st, 2007, 01:30 PM
#1
Thread Starter
Frenzied Member
getstring function
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,
Don't anthropomorphize computers -- they hate it
-
Nov 1st, 2007, 03:44 PM
#2
-
Nov 1st, 2007, 03:45 PM
#3
Thread Starter
Frenzied Member
Re: getstring function
I got it.
I had to use chr(0).
Thanks,
Don't anthropomorphize computers -- they hate it
-
Nov 1st, 2007, 03:46 PM
#4
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
|