Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Retrieve values from the Checksum (sys(2017))
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Pro
Database:
Visual FoxPro
Divers
Thread ID:
01018348
Message ID:
01023024
Vues:
12
Hi !

Sorry! It is by mistake I've mentioned the SYS(2017) in place of SYS(2007).

I'm using SYS(2007) for getting the checksum value of the records. Pls check the below mentioned function. In this function, I'm storing the data of all the fields in a variable and then generating a checksum value with the help of SYS(2007).

My question is ;
Is this possible to retrieve the fields data from the checksum value.


* ----------------------- *
FUNCTION CheckSum
* ----------------------- *
nFldcount = AFIELDS(aFldArray) && Creating an array and storing the field names
mFld = ''
FOR nCnt = 1 to nFldcount
IF ALLT(UPPE(aFldArray(ncnt,1))) # "CHKSUM"
IF nCnt = 1
mFld = 'STR('+ALLTRIM(UPPER(aFldArray(nCnt,1)))+')'
LOOP
ENDIF

DO CASE
CASE aFldArray(nCnt,2) = 'T' OR aFldArray(ncnt,2) = 'D'
mFld = mFld + '+DTOS(' + ALLTRIM(UPPER(aFldArray(nCnt,1))) +')'
CASE aFldArray(nCnt,2) = 'N' OR aFldArray(nCnt,2) = 'I'
mFld = mFld + '+STR(' +ALLTRIM(UPPER(aFldArray(nCnt,1))) +')'
CASE aFldArray(nCnt,2) = 'L'
mFld = mFld + '+' +IIF(&aFldArray(nCnt,1),"'T'","'F'")
OTHERWISE
mFld = mFld + '+' +ALLTRIM(UPPER(aFldArray(nCnt,1)))
ENDCASE
ENDIF
ENDFOR
RETURN (SYS(2007,&mFld))
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform