Hello, i'm trying to read a text file line by line, but readtext function is reading character by character. This is the code i'm using:
VarFile.OPEN('C:\FILE.TXT');
VarFile.CREATEINSTREAM(VarInStream);
WHILE NOT VarInStream.EOS() DO
BEGIN
VarInStream.READTEXT(VarText1024);
END;
0
Answers
The code looks fine to me - have you tried to use VarFile.TEXTMODE
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
:-k Strange indeed - I have tested the code on a Cronus database and it is working fine. Try specifing the Lenght in the Readtxt command or use the Varfile.Read command.
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
Freelance Dynamics AX
Blog : http://axnmaia.wordpress.com/
What i want to do is to change the first line (which is version of xml file) by another different line.
Maybe i could solve this problem by another way.
Freelance Dynamics AX
Blog : http://axnmaia.wordpress.com/
have a look at this post
viewtopic.php?f=23&t=29313&hilit=replace+string
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
thanks!!!!
Freelance Dynamics AX
Blog : http://axnmaia.wordpress.com/