Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Corrupted data
Message
De
27/08/2001 16:44:45
 
 
À
27/08/2001 16:08:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00549598
Message ID:
00549622
Vues:
12
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform