Read ASCII with InStream

kirkostaskirkostas Member Posts: 127
I have an ASCII file which contains empty lines, and I have wrote a function which open the file, removes empty lines and re-create it in order to use it in a dataport.
I have manually calculate each line characters.
Each line is 211 chars. So when I use
streamInTest.READTEXT(Txt, LineLength);
the variable LineLength is 211 for this specific file.
Is there any property or any method which returns me each line length?
I want to use the same code without needed to enter manually the line length...
kirkostas

Comments

  • andy76andy76 Member Posts: 616
    Also I have the same problem.
    Is there any solution?

    Thank you
  • kinekine Member Posts: 12,562
    It depends if the file is in text mode or binary mode. If you are in text mode, each READTEXT wll read one line. If you are in binary mode, it will read as many bytes as the length of the variable is.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.