Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!pt.cs.cmu.edu!andrew.cmu.edu!mg2n+ From: mg2n+@andrew.cmu.edu (Martin G. Greenberg) Newsgroups: comp.lang.pascal Subject: Re: Deleting records from TYPED file Message-ID: Date: 31 Aug 89 13:45:22 GMT References: <833@cbnewse.ATT.COM> Distribution: usa Organization: Class of '91, Carnegie Mellon, Pittsburgh, PA Lines: 20 In-Reply-To: <833@cbnewse.ATT.COM> A bunch of other people and I are involved in a similar project involving a database, and you have basically two ways to accomplish add, delete, etc. on a typed file. 1) The method mentioned in the original message. This is probably the most straight forward, but if the database is very large, it is very slow and you can run out of disk space at times. 2) Take advantage of TP's allowing you to SEEK positions in a file. This way you can do bump everything down and add the new record, or bump a section of the file back (over-write the record to delete) and then TRUNCATE the file so that it is one record shorter. This all assumes that you actually want to remove the record and not just use a flag to mark it, or some such scheme. MGG