Hi all,
I have a table that I want to output to a text file as fixed lenght records. However before I output all the records I need to output a header record.
I have tried the print command but this command does not output as fixed length. It treams the fields. I need the fields to be fixed length regarless of what is stored on each field.
Here is the code I am using.
I = 0
OutputLine = ""
'Output the Header Record
Print #FileNum, "P O BOX 5730 " & " " & RS.RecordCount
'start outputting the data
Do Until RS.EOF
For I = 0 To RS.Fields.Count - 1
OutputLine = OutputLine & RS.Fields(I).Value
Next I
Print #FileNum, OutputLine
I = 0
OutputLine = ""
RS.MoveNext
Loop
How can I acomplish to output each field as fixed length?
Thanks in advance.
EG
I have a table that I want to output to a text file as fixed lenght records. However before I output all the records I need to output a header record.
I have tried the print command but this command does not output as fixed length. It treams the fields. I need the fields to be fixed length regarless of what is stored on each field.
Here is the code I am using.
I = 0
OutputLine = ""
'Output the Header Record
Print #FileNum, "P O BOX 5730 " & " " & RS.RecordCount
'start outputting the data
Do Until RS.EOF
For I = 0 To RS.Fields.Count - 1
OutputLine = OutputLine & RS.Fields(I).Value
Next I
Print #FileNum, OutputLine
I = 0
OutputLine = ""
RS.MoveNext
Loop
How can I acomplish to output each field as fixed length?
Thanks in advance.
EG