Olaf Doschke
Programmer
Since ZAP simply truncates a file like FCHSIZE() does to HEADER() size only + EOF byte, you could recover data doing the opposite FCHSIZE.
This is also what I found at
I tried the code and like it doesn't work for me. Partly it can't, because it's not at all addressing the FPT file, just the DBF part. I think it's not due to this MSDN article applying to older Foxpro versions only, but due to the NTFS filesystem and how FCHSIZE gets new sectors allocated by the filesystem.
The result with VFP9 and adding records by changing file size is documented in the help on FCHSIZE as:
Does anyone have an old FAT partition available to check that it works in that file system, maybe an old USB thumb drive with just a few MB? It would be nice to see the dependency on the file system or if the FCHSIZE implementation really changed and made UNZIP impossible. In the end allocating random sectors of hdd space might have any unwanted side effects otherwise.
Bye, Olaf.
This is also what I found at
I tried the code and like it doesn't work for me. Partly it can't, because it's not at all addressing the FPT file, just the DBF part. I think it's not due to this MSDN article applying to older Foxpro versions only, but due to the NTFS filesystem and how FCHSIZE gets new sectors allocated by the filesystem.
The result with VFP9 and adding records by changing file size is documented in the help on FCHSIZE as:
In my case the result was empty records with no data, all zero bytes.vfp help said:When a file's size is increased, Microsoft Visual FoxPro allocates sectors for the file on the drive where the file is opened. Since FCHSIZE( ) does not initialize the new file space, the space can contain previous data. Be sure to manage the new file space.
Does anyone have an old FAT partition available to check that it works in that file system, maybe an old USB thumb drive with just a few MB? It would be nice to see the dependency on the file system or if the FCHSIZE implementation really changed and made UNZIP impossible. In the end allocating random sectors of hdd space might have any unwanted side effects otherwise.
Bye, Olaf.