Import 2.6 data in 4.0 database via dataport goes wrong
livingdoll
Member Posts: 45
Hi there
I have a huge csv file, generated in a 2.60 database, that contains data of ten different tables.The data has to be imported in an empty 4.0 database. The file is generated not by a dataport but by code - writing data to a file variable. The data of the tables is separated with a blank row in the file. The file is imported with a dataport that contains 10 dataitems.
The import of the first 6 tables goes well (that is, without error messages), but at some point during the import of the lines of table 6 something goes wrong. I get the message that the value 'EXAMPLETEXT' cannot be stored in DECIMAL. I think something goes wrong with the field delimiter but I can't figure out what. I tried delimiting the fields with ; but that wasn't an option because there were text fields that contained that character. So I tried ^, ^^ and even tab. Without result.
I'm stuck. Could it be an ansi/ascii problem? Any tips would be very welcome.
Best regards,
Dolls
I have a huge csv file, generated in a 2.60 database, that contains data of ten different tables.The data has to be imported in an empty 4.0 database. The file is generated not by a dataport but by code - writing data to a file variable. The data of the tables is separated with a blank row in the file. The file is imported with a dataport that contains 10 dataitems.
The import of the first 6 tables goes well (that is, without error messages), but at some point during the import of the lines of table 6 something goes wrong. I get the message that the value 'EXAMPLETEXT' cannot be stored in DECIMAL. I think something goes wrong with the field delimiter but I can't figure out what. I tried delimiting the fields with ; but that wasn't an option because there were text fields that contained that character. So I tried ^, ^^ and even tab. Without result.
I'm stuck. Could it be an ansi/ascii problem? Any tips would be very welcome.
Best regards,
Dolls
0
Comments
-
livingdoll wrote:So I tried ^, ^^ and even tab. Without result.
You mean you tried to change the code and re-export the file from the 2.6 db?0 -
I've found that using <TAB> as the seperator eliminates alot of problems when the data contains commas, quotes & other problem making symbols.
I personally wouldn't create a 10 dataitem dataport myself, but that's another story 8)0 -
The 10 dataitem thing wasn't my idea either, I'm just the one that has to clean up the mess someone else made of it...
I think I solved the initial problem by changing the Start and End delimiter properties of the import dataport to <None>. That seems to do the trick.
However, the next error message has already come up a little bit further in the import process: 'Decimal cannot be empty'. My first guess it has to do something with an NotBlank that is set to true for a decimal field in one of the tables?
Best regards,
Dolls0 -
livingdoll wrote:My first guess it has to do something with an NotBlank that is set to true for a decimal field in one of the tables?
Yep, that's most likely the case. I've ran into a couple of this problem before importing data from 2.0 to >2.0. The NotBlank property is handled differently from 3.x and beyond.Confessions of a Dynamics NAV Consultant = my blog
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book0
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