File text and NF

Durand
Member Posts: 61
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
-
Use C/Side Reference Guide - Letter 'F'
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)LdL0 -
Thank you for the help, but I have another problem. I don't known to read the file text.Is it necessary to use a repetitive structure. But which is the syntax with the end of the file ( EOF). Should one use a data groups, if yes, how defines it one?
Thank, you (sorry for my english...), Benoît.0 -
Here is an example:
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;No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0 -
Hi Benoit,
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 Stefan0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions