Using Filestream DOTNET with NAV

OldNavDog
Member Posts: 88
Since the THEY have now RUINED the usefulness of the FILE Commands SEEK and READ...
Yes, the "SEEK" command (and the "READ") are still technically "Supported"; HOWEVER, in NAV 2013 or above, if you attempt to do a READ into a Text Variable that has a Length LONGER than the amount of Bytes "left" to Read, you get a nasty Error.
Reading into an INSTREAM avoids the error (and nicely tells you how many bytes WERE read); but it has no "SEEK" method (!!!!)
:roll:
Other than the hokey suggestions to read into a "char" variable, one character at a time, there doesn't seem to be a way to "skip around" in a file (SEEK) (like FILE.READ supports), but still read-in a potentially shorter-than-variable-length number of bytes (like INSTREAM.READ supports).
I note that the Filestream DOTNET Class (in mscorlib) supports SEEK, and the same "Read n Bytes, or until EOF") functionality; but I'm not good enough with DOTNET to figure out how to make it work from within C/AL. ](*,)
Can someone help?
TIA!!!
Yes, the "SEEK" command (and the "READ") are still technically "Supported"; HOWEVER, in NAV 2013 or above, if you attempt to do a READ into a Text Variable that has a Length LONGER than the amount of Bytes "left" to Read, you get a nasty Error.
Reading into an INSTREAM avoids the error (and nicely tells you how many bytes WERE read); but it has no "SEEK" method (!!!!)
:roll:
Other than the hokey suggestions to read into a "char" variable, one character at a time, there doesn't seem to be a way to "skip around" in a file (SEEK) (like FILE.READ supports), but still read-in a potentially shorter-than-variable-length number of bytes (like INSTREAM.READ supports).
I note that the Filestream DOTNET Class (in mscorlib) supports SEEK, and the same "Read n Bytes, or until EOF") functionality; but I'm not good enough with DOTNET to figure out how to make it work from within C/AL. ](*,)
Can someone help?
TIA!!!
Experience is what you get, when you don't get what you want. --Anon.
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