Hi,
I been trying to export records to a text file. I have tried the techniques presented in the MSDN "Using Random Access File" - Using the combination user-defined type with fixed size fields, the Open statement for random access and the Put command to write the contents of the user-defined type variable. My problem with this approach is that i dont get how to write the next record to the next line on the file. I tried to insert chr(13)+chr(10) after each Put statement
but could not work it out.
I resorted to trying the Export feature of the DataReport but my problem is i don't know how much twips is equivalent to 1 character. Does anyone knows how much twips? Do you have some tips for this method of exporting fixed-width record to a text file?
OR,
Can anyone share code snippets to for this purpose?
I would highly appreciate if you could share some tips and techniques.
TIA
I been trying to export records to a text file. I have tried the techniques presented in the MSDN "Using Random Access File" - Using the combination user-defined type with fixed size fields, the Open statement for random access and the Put command to write the contents of the user-defined type variable. My problem with this approach is that i dont get how to write the next record to the next line on the file. I tried to insert chr(13)+chr(10) after each Put statement
Code:
Type DTR
Period as String * 10
Emp_ID as String * 6
:
:
end Type
Code:
Open Filename For Random As #FileHandle Len=Len(My_DTR)
Code:
Put #FileHandle,,My_DTR
Put #FileHandle,,chr(13)+chr(10)
but could not work it out.
I resorted to trying the Export feature of the DataReport but my problem is i don't know how much twips is equivalent to 1 character. Does anyone knows how much twips? Do you have some tips for this method of exporting fixed-width record to a text file?
OR,
Can anyone share code snippets to for this purpose?
I would highly appreciate if you could share some tips and techniques.
TIA