Solved

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

Posted on 2008-10-27
2
365 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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

732 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