Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stuctural cdx or idx not found
Message
De
05/10/1998 06:28:01
 
 
À
05/10/1998 02:33:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00141779
Message ID:
00143799
Vues:
32
>thanks
>*code to remove cdx
>handle=fopen("mytable.dbf",12)
>=fseek(handle,28)
>lnPokeByte = bitand(asc(fread(handle,1)),0xFE)
>=fseek(handle,28)
>=fwrite(handle,lnPokeByte,1)
>=fwrite(handle,CHR(lnPokeByte),1)
>=fclose(handle)
>
>similarly i can use the code to put the cdx byte again by
>
>
>handle=fopen("mytable.dbf",12)
>=fseek(handle,28)
>&& changed here
>lnPokeByte = bitor(asc(fread(handle,1)),0xFE)

No, you'd say:

lnPokeByte = bitor(asc(fread(handle,1)),1)

to set the bit masked out by the bitand() above.

>
>=fseek(handle,28)
>=fwrite(handle,CHR(lnPokeByte),1)
>=fclose(handle)
>
>
>is that so
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform