web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

How to apply StreamWriter and Text Encoding in NAV2009?

(0) ShareShare
ReportReport
Posted on by

In 2016,

We have DOTNET Variable for the StreamWriter and Text Encoding  like below

outFile.CREATE('c:\temp\OutFile.txt');

  outFile.CREATEOUTSTREAM(outStream);

  streamWriter := streamWriter.StreamWriter(outStream, encoding.Unicode);

 

  streamWriter.WriteLine('Hello World');

 

  streamWriter.Close();

  outFile.CLOSE();

But do apply the same in NAV2009?

Please Help....

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Amol Salvi Profile Picture
    18,698 on at

    In NAV 2009 we do not have dotnet datatype...

  • Suggested answer
    Rehan Satti Profile Picture
    634 on at

    Hi, you can use following way to write some thing in file. For communication with webservices you can use automation variable given in NAV 2009.

    logfile.WriteMode := true;

    logfile.OPEN('Currency_log_file.log');

    logfile.POS(logfile.LEN); //set position in file to the end

    logfile.Write(...);

    logfile.Close;

    DotNet & stream types are available in dynamics NAV 2009 R2.

    Have a look !

    7853.3.PNG

  • Othman Abo Salah Profile Picture
    70 on at

    You can't apply the same as long as the Unicode parameter had been added from nav 2013 R2 and efter

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans