Hi All
I have to create a text file to send data to a bank - I created a database
with one field - I build each line in the databases and then use copy to
SDF with no delimiters but when the file is created it has an end of line
marker - when the file is imported to the bank it fails because of the end of line marker - can anyone suggest another way to do this.
Regards
Colin
Create Text File
hello,
you can create txt files using the class TTxtfile:
regards
you can create txt files using the class TTxtfile:
Code: Select all
cFile = 'MyOrder.txt'
oFile = TTxtFile():New( cFile )
select mBD
go top
while .not.eof()
cLine = ''
for ii=1 to fcount()
cLine+=fieldget(ii)
next
oFile:Add( cLine )
skip +1
enddo
oFile:Close()
return
Re: Create Text File
Hi Colin:Colin Haig wrote:I have to create a text file to send data to a bank - I created a database
with one field - I build each line in the databases and then use copy to
SDF with no delimiters but when the file is created it has an end of line
marker - when the file is imported to the bank it fails because of the end of line marker - can anyone suggest another way to do this.
The same way you fill the record field, you may fill a cLine character variable, then add it to a cText next way:
Code: Select all
cText := ""
For nI := 1 To nTotalLines
cLine := cYourTextLine
cText += cLine + CRLF
Next
MemoWrit( "MyText.txt", cText )
Regards
Manuel Mercado
-
- Posts: 310
- Joined: Mon Oct 10, 2005 5:10 am
Create Text File
Thanks Yuri and Manual for your quick replies - I used the TTxtFile Class
and everything worked fine.
Regards
Colin
and everything worked fine.
Regards
Colin