You need to use num2char() function to save special characters in the file.

.
.
   str strCRLF=num2char(13)+num2char(10);
.
.
   bd.setStrData("Hello, " + strCRLF + bd.getStrData());
.
.


just add the strCRLF where you need a carriage return line feed (CRLF) in your file.




From: "volkankaraboga" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [development-axapta] Re: creating and writing a file
Date: Thu, 11 Dec 2003 16:05:11 -0000

before thanks your help
what shuld I do if I want to write to a new line in the txt file?


--- In [EMAIL PROTECTED], "Holger K. Pedersen" <[EMAIL PROTECTED]> wrote: > You can use TextBuffer class or BinData class, which are easy to use. > > static void FileTestJob(Args _args) > { > TextBuffer tb; > BinaryIo bio; > BinData bd; > > tb = new TextBuffer(); > tb.setText("some text"); > print tb.getText(); > > bd = new BinData(); > bd.setStrData("Axapta"); > bd.saveFile(@"C:\kilroy.txt"); > pause; > bd.loadFile(@"C:\kilroy.txt"); > bd.setStrData("Hello, " + bd.getStrData()); > bd.saveFile(@"C:\kilroy.txt"); > > tb.setText(""); // If you forget this one, the fromFile() will append to > the current textbuffer. > tb.fromFile(@"C:\kilroy.txt"); > print tb.getText(); > } > > I'll hope this is useful. > > >From: "volkankaraboga" <[EMAIL PROTECTED]> > >Reply-To: [EMAIL PROTECTED] > >To: [EMAIL PROTECTED] > >Subject: [development-axapta] creating and writing a file > >Date: Thu, 11 Dec 2003 10:07:19 -0000 > > > >Hi all... > > > >I want to create and write a txt file through axapta but I cant find > >any function about this. > >How can I do this? or can I do this with using axapta? > >thanks your advise... > > > > _________________________________________________________________ > Få alle de nye og sjove ikoner med MSN Messenger http://messenger.msn.dk/


_________________________________________________________________ Få alle de nye og sjove ikoner med MSN Messenger http://messenger.msn.dk/



Yahoo! Groups Sponsor ADVERTISEMENT
click here


Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

Reply via email to