read text file
roshanthapa
Member Posts: 90
I want to read a previous lines of the text file.
How do I read the previous lines from a text file line by line? ( the situation is same as when textmode is on and we read line by line. But I need to read line by line in reverse like line no. 10 read first, then line no. 9 then 8 then 7 then 6, like that) ....
How do I read the previous lines from a text file line by line? ( the situation is same as when textmode is on and we read line by line. But I need to read line by line in reverse like line no. 10 read first, then line no. 9 then 8 then 7 then 6, like that) ....
0
Comments
-
create a table with fileds line no and text. Read file directly into table. Then start logic from table instead of from file.0
-
Thanks fl. Very good reply, I appreciate that.
But the field in the table with datatype:text can hold only 250 characters at most but I have 1024 characters in some lines so I won't be able to store that much characters in the field in a table.
So I don't think it is wise to store each line of text file into a table. Yeah we can break down each line of text file and store it in a table.
Is there any other solution or better than what I thought?0 -
Hello you can also use an array.
write all of the text to 1024 text array. and then loop backwards.
I := ArrayLen(MyArray);
while I < 1 Do begin
dostuff(Myarray);
I -= 1;
end;0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
