Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How To Export Text File (FAST) With Header Record ... ???

Status
Not open for further replies.

MarkDicken

IS-IT--Management
Jun 5, 2000
55
CH
Hello All,

Another good one ...

I need to export a table in a defined format to satisfy another system.

The problem is that it requires a Header Record.

The Import/Export Specification looks like is does not cater for Header Record Requirements.

Now I could write the whole thing manually but as always I would like to see if there are any routines or tricks around to do the job.

The Header record (in Text File Format) has to have the following details :-

4 Characters = 0001 - Hard Coded
6 Characters = 000432 - A Reference Number
8 Characters = 000000002 - Number of Records + 1 (thats Records + a Header Record Sum)
8 Characters = 00000000 - Hard Coded
16 Characters = YYYYMMDDHH:NN:SS - Time of NOW formatted
7 Characters = "FASTFAX" - Hard Coded

* Then Space padded to 75 Characters

After this Header Record I would like to append my standard Export Specification to the Text File.

Any Ideas ... ???

Many Thanks In Advance

Regards

Mark Dicken
England, UK
 
Assuming that you're creating a text file, how about creating a one-line table as one file, and concatenating. (Blushing because I don't know the REAL answer!)
 
Larryww (and ALL),

Actually this is what I ended up doing.

I even did the 1 line table as you suggested, so it would be easier to look at in the future.

And to concatinate the 2 Temp files together, I have a read the file(s) in line by line and created the final text file.

No need to Blush because your proposed answer is what I did infact have to do due to limitations of MS Access

Regards

Mark Dicken
England, UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top