Author Topic: Import CSV. Column containing more than 255 chars.  (Read 3045 times)

ggandhi

  • EA User
  • **
  • Posts: 28
  • Karma: +0/-0
    • View Profile
Import CSV. Column containing more than 255 chars.
« on: February 25, 2014, 11:38:15 pm »
I am importing a CSV file into a Sparx Repository package to create nodes. I am selecting Import/Export > CSV Import/Export from the package Context (right-mouse) menu. I select my Specification 'CMDB_DISCOVERY_NODE', click on Action = Import, then on Run button.

If any CSV column contains data with more than 255 characters, I get the following message:
DAO.Field[3163]
This field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data.

My plan (to avoid this error message) is to write a JScript that performs the import and traps the error, allowing the import to skip over this row and continue importing.  Then I could print a report showing the row numbers of any CSV rows that failed the import due to the above-described error.

Please can you show me how to programatically (JScript) perform the CSV import using my CSV Import Specification 'CMDB_DISCOVERY_NODE'.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Import CSV. Column containing more than 255 ch
« Reply #1 on: February 26, 2014, 05:40:14 pm »
My Simple VBA Excel importer might be of use.

Geert