Dataport RecordSeparator Property values
rsaritzky
Member Posts: 469
Hi,
For Dataports, C/Side help says this about the values of the "RecordSeparator" property:
Value: Description
<None>: There will no be RecordSeparator
<NewLine>: (default) "Any combination of CR and LF characters"
<CR/LF>: CR followed by LF
<CR>: CR alone
<LF>: LF alone
<TAB>: Tabulator alone
Other strings: The literal string entered
My question is about the default <NewLine> value.
My interpretation of "Any combination of CR and LF characters" would be that it would detect a <CR><LF>, and perhaps <CR><LF><CR>, but would ALSO detect ONLY a <CR> or ONLY a <LF>. However, my testing has seemed to indicate that when there is ONLY a <CR> character terminating a line, the <Newline> value does NOT detect this as a record separator.
Can anyone confirm my suspicion?
We're downloading data from a bank and trying to dataport it in. But we're discovering that sometimes the CSV from the bank ends its lines in an <LF> only, and sometimes a <CR> only, and sometimes a <CR><LF> - this is the same file downloaded weekly. I'm suspecting that it may have to do with some workstation or session specific settings during the download, but haven't been able to drill down on that yet. So I'm trying to make the Dataport as "accommodating" as possible.
This is NAV2009 SP1 by the way.
For Dataports, C/Side help says this about the values of the "RecordSeparator" property:
Value: Description
<None>: There will no be RecordSeparator
<NewLine>: (default) "Any combination of CR and LF characters"
<CR/LF>: CR followed by LF
<CR>: CR alone
<LF>: LF alone
<TAB>: Tabulator alone
Other strings: The literal string entered
My question is about the default <NewLine> value.
My interpretation of "Any combination of CR and LF characters" would be that it would detect a <CR><LF>, and perhaps <CR><LF><CR>, but would ALSO detect ONLY a <CR> or ONLY a <LF>. However, my testing has seemed to indicate that when there is ONLY a <CR> character terminating a line, the <Newline> value does NOT detect this as a record separator.
Can anyone confirm my suspicion?
We're downloading data from a bank and trying to dataport it in. But we're discovering that sometimes the CSV from the bank ends its lines in an <LF> only, and sometimes a <CR> only, and sometimes a <CR><LF> - this is the same file downloaded weekly. I'm suspecting that it may have to do with some workstation or session specific settings during the download, but haven't been able to drill down on that yet. So I'm trying to make the Dataport as "accommodating" as possible.
This is NAV2009 SP1 by the way.
Ron
0
Comments
-
I have the idea that it is better to write a codeunit with a variable of type File for reading the data. This way you have a lot more control on these things.
But you need to handle everything yourself.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
- 322 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