Hello, How can one create a file text in the root of the hard disk, then he transferred by the data of Navision (example, code and name of the customers) at first time? Next, How can one read it sequential of Navision.? And the end, then how can one destroy it? Thank you for your invaluable help, Benoît.
0
Comments
To create the file :
Use f.CREATE(FileName) and f.TEXTMODE(TRUE)
To transfer Navision data use a report and
in the Body OnPreSection add the necessary code to write your fields to the txt file (f.WRITE(Value))To read the file : f.READ(Variable)
To erase the file : ERASE(Name)
Thank, you (sorry for my english...), Benoît.
TextFile : File
TextLine : Text[250]
TextFile.TEXTMODE := TRUE;
TextFile.OPEN('c:\file.txt');
WHILE TextFile.POS <> TextFile.LEN DO BEGIN
TextFile.READ(TextLine);
END;
TextFile.CLOSE;
if the Text-Row in your File larger than 250 Bytes. You can also use a Dataport for an easier Import or Export of Data.
Regards Stefan