John,
don't fool yourself. This procedure will make some changes to the header of the table, but if the the table is zapped, the data is not in the table anymore.
Having said that, it may or may not be possible to recover the old table from the recycle bin or the .BAK file.
>Jos, AT Least, somebody with open mind, yes theoretically if no process have writed the sector of packed file it can be restored. I found the next code on my old downloads, its called unzap, it supposed to recover all zapped records, i was testing it but something is wrong.
>I put this code here, i don't know who is the owner but, i'm sure it was totally free when i found it.
>Take a look Jos:
>*Hay veces que incluso despues de un ZAP, ;
>se puede recuperar los registros, solo
>*funciona si no se han escrito datos ;
>encima de esos registros.
>
>*Ussage:
>*ZAP
>*=UNZAP(47) && restore 47 records
>
>PARAMETER Y
>SET STEP ON
>IF Y>0 .AND. USED()
> IF RECCOUNT()=0
> FILENAME=DBF()
> USE
> HANDLE=FOPEN(FILENAME,2)
> IF HANDLE>0
> BYTE=FREAD(HANDLE,32)
> BKUP_BYTE=BYTE
> FIELD_SIZE=ASC(SUBSTR(BYTE,11,1))+(ASC(SUBSTR(BYTE,12,1))*256)
> FILE_SIZE=FSEEK(HANDLE,0,2)
> BYTE8=CHR(INT(Y/(256*256*256)))
> BYTE7=CHR(INT(Y/(256*256)))
> BYTE6=CHR(INT(Y/256))
> BYTE5=CHR(MOD(Y,256))
> BYTE=SUBSTR(BYTE,1,4)+BYTE5+BYTE6+BYTE7+BYTE8+SUBSTR(BYTE,9)
> =FSEEK(HANDLE,0)
> =FWRITE(HANDLE,BYTE)
> =FCHSIZE(HANDLE,FILE_SIZE+(FIELD_SIZE*Y))
> =FCLOSE(HANDLE)
> ENDIF
> USE &FILENAME
> ENDIF
>ENDIF