• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 369
  • Last Modified:

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

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
alanjbrown
Asked:
alanjbrown
1 Solution
 
developmentguruPresidentCommented:
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
 
2266180Commented:
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now