Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange Characters following character data in field
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Strange Characters following character data in field
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01180814
Message ID:
01180814
Vues:
63
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?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform