Article View: borland.public.cppbuilder.nativeapi
Article #11239Re: how to delete entry from binary file
From: Bob Gonder
Date: Fri, 20 Feb 2004 18:52
Date: Fri, 20 Feb 2004 18:52
11 lines
1518 bytes
1518 bytes
Remy Lebeau (TeamB) wrote: >Create a new file that contains a copy of items 1 through 4 and 6 through >the end of the file. Another way to go would be to add a "deleted" char to your structure. Set the char to some value that you understand to mean "this file entry has been deleted" and write it back. Then whenever you are processing the file, ignore structures that are "deleted". Once a day/week/month, whenever, you can copy the file, leaving out the "deleted" records.
Technical Details
Message-ID:
<5glc30pk6pk2vqhu6c64ij314obq75frce@4ax.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<40355519@newsgroups.borland.com> <40356075$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,8399063c6dc327e5 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2004-02-20 11:05:37 PST From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: how to delete entry from binary file Date: Fri, 20 Feb 2004 10:52:02 -0800 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <5glc30pk6pk2vqhu6c64ij314obq75frce@4ax.com> References: <40355519@newsgroups.borland.com> <40356075$1@newsgroups.borland.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 67.31.164.52 X-Trace: newsgroups.borland.com 1077303122 67.31.164.52 (20 Feb 2004 10:52:02 -0800) Lines: 13 Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail