Thanks for the initial solution but i tried that already.
I need to embed the codes "chr(13)+chr(10)" at the end of each line in that ascii file. Foxpro is interpreting the codes instead of appending it.
Are you saying you need a CRLF at the end of each field or just at the end of each record? What version and SP level of VFP are you using, and what OS (e.g. Win 98, XP Pro).
It puts each record on a single line with a carriage return and line feed at the end of each line as a separator.
Now, if you are trying to put chr(13)+chr(10) as part of the data ... that is different and needs to be handled differently. Maybe you have not been clear about your needs.
What i intend to to create is an ascii file with detail lines terminated by CRLF.
e.g.
the quick brown fox jumps over the head of the lazy dogô◙
the quick brown fox jumps over the head of the lazy dogô◙
the quick brown fox jumps over the head of the lazy dogô◙
Did you see the codes at the end of each line? something like that. The required record layout must contain that character as the end of record marker for the upload program to recognize each line.
I already tried creating another field containing the
chr(13)+chr(10) codes
field1 CRLF
[the quick brown ...] [chr(13)+chr(10)]
select field1,CRLF from <file name> ;
into cursor <cursor name>
copy to <ascii file name> sdf
when i executed the script and checked the ascii file that was created it showed :
the quick brown fox jumps over the head of the lazy dog
the quick brown fox jumps over the head of the lazy dog
the quick brown fox jumps over the head of the lazy dog
The codes were interepreted instead of appending it at the end of each line.
It's getting complicated huh. Right now i am experimenting on the FILETOSTR and STRTOFILE functions of foxpro, and researching a lot.
You definitely won't see the CR/LF characters whenever you use a text file viewer/editor. It always interprets the CR/LF so you can see records as separate lines of info. Try using a binary file viewer and you should see the corresponding ASCII codes.
I'm not sure what type of uploader you have there. But basically, all upload programs that can read file records in text format requires only a single CR/LF pair to indicate end of record.
I downloaded the binary file viewer/editor and I was able to view the charcters i was looking for (2 happy faces). This TAR (Technical Assistance Request) is closed.
Thanks again guys for your help.
Salamat din medic sa tulong mo. Regards to all.
sampaloc
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.