Group - Delphi List
Sent: Saturday, September 05, 2009 5:08 PM
Subject: Re: [DUG] Setting Data File Size
Not sure if I am on the same page as you John, are you still working this
through only just saw it?
One OS safe method - if you are using fixed record sizes, then instead of
Not sure if I am on the same page as you John, are you still working this
through only just saw it?
One OS safe method - if you are using fixed record sizes, then instead of
removing a record (and repacking the file in situ) re-enter/alter the
record with a key field saying "deleted" or something
John asked:
> Is there a simple way to alter the size of an existing file -
> particularly to decrease the size?
Unless TFileStream has changed since I last looked in detail, you
won't find it easy.
I know that in similar cases I ended up adopting the "write to temp
file/rename-after" approach;
Is there a simple way to alter the size of an existing file - particularly to
decrease the size?
If increasing I can append some blank data on the end no problem using
TFilestream, no problem.
The thing I am not sure about is if I can DECREASE the size of a file by a
known number of bytes
(Ba