Why does NAV5 suddenly put character 0 after each write to a file?
I have made myself a report to write data into a file with extreme length in every line. So I do as so often before.
fifile.create('path+name');
fifile.textmode(false);
fifile.writemode(true);
fifile.write(field1);
fifile.write(field2);
etc
etc
Has worked like a charm for years. So why oh why does navision now put Char(0) after each field?
Have tried various formatting of the fields I'm sending, writemode(false), Outstream.write. But every time a write is made, NAV insist on putting Char(0) into my line ](*,)
Don't just take my word for it, test it yourself
0
Comments
If you REALLY need fifile.textmode(false);, you can also do this after each fifile.WRITE(...);
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
f.SEEK(f.POS - 1) does the trick 8)
But it leaves me with having various codelines depending on version :evil: (I wonder how it will work after SP X :-$ )
"If it's not broken, don't fix it" apparently don't much any more :bug:
With an outstream variable you will get the terminating null if you use If you use you won't get it. So you can use OutStream to write into your file.
It will write it correctly...
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.