- CLOSE DATABASES all
- lcTable = GETFILE('dbf') && Selectionner une table
- lnHnd = Fopen( lcTable, 2 )
- If lnHnd > 0
- FSEEK( lnHnd, 5) && Retrouver les 5 premiers bytes
- lcStr = Fread( lnHnd, 5)
- lcNewstr = RIGHT(lcStr,1)
- For i = 4 To 1 Step -1
- lcNewstr = lcNewstr + SUBSTR(lcstr, i, 1) && Inverser l'ordre des 5 premiers bytes
- Endfor
- FSEEK( lnHnd, 5)
- Fwrite( lnHnd, lcNewstr ) && Réécrire les cinq premiers bytes
- Fclose(lnHnd) && Fermer le fichier
- ELSE
- MESSAGEBOX("Couldn't open table!",16,"Error...")
- ENDIF
CLOSE DATABASES all
lcTable = GETFILE('dbf') && Selectionner une table
lnHnd = Fopen( lcTable, 2 )
If lnHnd > 0
FSEEK( lnHnd, 5) && Retrouver les 5 premiers bytes
lcStr = Fread( lnHnd, 5)
lcNewstr = RIGHT(lcStr,1)
For i = 4 To 1 Step -1
lcNewstr = lcNewstr + SUBSTR(lcstr, i, 1) && Inverser l'ordre des 5 premiers bytes
Endfor
FSEEK( lnHnd, 5)
Fwrite( lnHnd, lcNewstr ) && Réécrire les cinq premiers bytes
Fclose(lnHnd) && Fermer le fichier
ELSE
MESSAGEBOX("Couldn't open table!",16,"Error...")
ENDIF