Solved

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

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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…

803 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