Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Corrupted data
Message
From
27/08/2001 16:44:45
 
 
To
27/08/2001 16:08:51
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00549598
Message ID:
00549622
Views:
17
>How do I do to identify corrupted data?
>I refer to the characters chr(1-31).
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."
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform