Solved

reading and writing files of type record where there is a header or trailer record

Posted on 2008-10-27
2
364 Views
Last Modified: 2010-04-05
How can I read or write files of type record where there is a header and or trailer record which has a different length and structure to the records in the body of the file?
0
Comment
Question by:alanjbrown
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 21

Expert Comment

by:developmentguru
ID: 22812387
Normally this is done in one of two ways.  XML will allow you to mix this sort of data but it is wildly inefficient.  If you want the speed of a database in what you are working on, this is normally achieved by writing the records to two different tables and loading them separately based on a common ID field.  If you have large volumes of data each data file is normally accompanied by an index (to speed the lookups).
0
 
LVL 28

Accepted Solution

by:
2266180 earned 250 total points
ID: 22815472
using the unit I gave you in the other question (for future reference: http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_23848518.html ), you will be using the
OnBeforeConvertRecord
and
OnAfterConvertRecord
too read/write any data that is before and/or after the record.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question