Re: [DUG] Setting Data File Size

2009-09-06 Thread John Bird
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

Re: [DUG] Setting Data File Size

2009-09-04 Thread Paul A Norman
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

Re: [DUG] Setting Data File Size

2009-08-25 Thread Peter Hyde
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;

[DUG] Setting Data File Size

2009-08-24 Thread John Bird
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