Import 2.6 data in 4.0 database via dataport goes wrong

livingdolllivingdoll 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

Comments

  • kapamaroukapamarou Member Posts: 1,152
    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?
  • SavatageSavatage Member Posts: 7,142
    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)
  • livingdolllivingdoll Member Posts: 45
    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,

    Dolls
  • Alex_ChowAlex_Chow Member Posts: 5,063
    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.
Sign In or Register to comment.