Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange Characters following character data in field
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Strange Characters following character data in field
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01180814
Message ID:
01180814
Views:
62
I am getting strange looking characters following the data in the character fields. I even padded with Blanks in order to try to compensate for this.
SELECT Patients
DO WHILE NOT FEOF(nFileHandle)
  * Grab 112 characters, strip off the first nine
  cString=FREAD(nFileHandle, 112)
  lcFirstName=PADR(ALLTRIM(SUBSTR(cString, 10, 29)), 29, " ")	&& First Name
  lcLastName =PADR(ALLTRIM(SUBSTR(cString, 39, 29)), 29, " ")	&& Last Name
  lcSSN      =PADR(ALLTRIM(SUBSTR(cString, 68, 11)), 11, " ")   && SSN
  lcDOB      =SUBSTR(cString, 97, 8)	&& Date of Birth
  lcDOBMonth =SUBSTR(lcDOB,5,2)
  lcDOBDate  =SUBSTR(lcDOB,7,2)
  lcDOBYear  =LEFT(lcDOB,4)
  lcDOBDate  =lcDOBMonth + "/" + lcDOBDate + "/" + lcDOBYear
  ldDOB      =CTOD(lcDOBDate)
  lcGender   =PADR(ALLTRIM(SUBSTR(cString, 106, 1)), 1, " ")	&& Gender
  APPEND BLANK
  REPLACE ;
	firstname WITH lcFirstName, ;
	lastname  WITH lcLastName, ;
	ssn       WITH lcSSN, ;
	dob       WITH ldDOB, ;
	Gender    WITH lcGender
ENDDO
Has anyone run into this? Do I need to do some kind of low-level cleaning up first?
Next
Reply
Map
View

Click here to load this message in the networking platform