InStream.READTEXT show me the wrong data

Brax
Member Posts: 4
Hello everyone,
I'm new on Dynamics NAV.
Currently, i'm working with NAV 2013 R2.
I have some synchronize problem, I explain :
I want to open a .txt file and read it. But when I read this file, it show me the wrong text.
Yesterday my text was "mon texte" and I updated it manually to "HELLO WORLD", but my code show me "mon texte".
You can see the result on attachment file.
Thanks a lot in advance for your answers.
I'm new on Dynamics NAV.
Currently, i'm working with NAV 2013 R2.
I have some synchronize problem, I explain :
I want to open a .txt file and read it. But when I read this file, it show me the wrong text.
Yesterday my text was "mon texte" and I updated it manually to "HELLO WORLD", but my code show me "mon texte".
You can see the result on attachment file.
Thanks a lot in advance for your answers.
l_Filename := 'C:\temp\fichier.txt'; l_File.TEXTMODE(TRUE); IF NOT FILE.EXISTS(l_Filename) THEN BEGIN MESSAGE('NOT FOUND'); END ELSE BEGIN l_File.OPEN(l_Filename); l_File.CREATEINSTREAM(MyInStream); MyInStream.READTEXT(l_Texte,100); MESSAGE(l_Texte); l_File.CLOSE; END;
0
Answers
-
Are you working on single machine with servicetier and client or servicetier is installed in some other server?0
-
Is your file on the server where the Service Tier is running, C:\Temp\ is on This server and when Message "Not Found" not are shown it means it find a file and with the text "mon texte"0
-
mohana_cse06 wrote: »Are you working on single machine with servicetier and client or servicetier is installed in some other server?
I work in remote desktop connection of a server which have the client and devlopment app installed but the sql is on an other server0 -
Is your file on the server where the Service Tier is running, C:\Temp\ is on This server and when Message "Not Found" not are shown it means it find a file and with the text "mon texte"
The file in C:\temp and the service tier are on the same server. When the service tier is running, my file in C:\temp is not open. Yes I'm agree with you but when I check my folder C:\temp there is only one file fichier.txt and when I open it, the text is not "mon texte" but "HELLO WORLD".
Moreover, when I create manually a new txt file, and then I run my code, it don't find it. I think it's not synchronized. I have to wait few hours to see it.0 -
[Topic moved from 'NAV/Navision Classic Client' forum to 'NAV Three Tier' forum]
Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0
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