lcStr = FileToStr('MyFile.dbf') lcStr = Substr(lcStr, 200) && Don't know how long the header is but made a guess at 200 bytes lcRepStr = '' For iLoop = 32 to 256 lcRepStr = lcRepStr + CHR(iLoop) Next lcOutStr = StrTran(lcStr, lcRepStr, '') If Len(lcOutStr) > 0 ? 'We have some corruption' Endif>>How do I do to identify corrupted data?
LPARAMETERS ; > tcString > >LOCAL ; > lnIx, ; > lnBadCount > >lnBadCount = 0 > >FOR lnIx = 1 TO LEN(tcString) STEP 1 > IF ASC(SUBSTR(tcString, lnIx, 1)) > 0 ; > AND ASC(SUBSTR(tcString, lnIx, 1)) < 32 > > * Character is "bad": > lnBadCount = lnBadCount + 1 > > ELSE > * Character is OK > > ENDIF > >ENDFOR > >WAIT WINDOW "There are " + LTRIM(STR(lnBadCount)) + ; > " bad characters in the string."