Book a Demo

Author Topic: SQL error when element name > 255 characters  (Read 4040 times)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
SQL error when element name > 255 characters
« on: April 28, 2009, 03:51:19 pm »
When you change the name of an object to be longer then 255 characters the GUI will allow it but you get an SQL error "string or binary data will be truncated" when it tries to save the element to the database. At first it seems like the name is accepted (the element shows the full name on the diagram) but when it is refreshed the name of the element is not saved to the database and reverts back to the original name (Action1)
The only seems to happen on a DBMS (SQL Server) and not on an Access repository. The latter will not show the error, but truncate the name anyway.

Steps to reproduce:
  • Add a new action (or any other element) to a diagram
  • In the name field paste a name longer then 255 characters
  • Click OK
  • Notice the error "string or binary data will be truncated"
  • Notice that the full name (>255 ch) is displayed on the diagram
  • Doubleclick the action on the diagram
  • Click OK.
  • Notice that the default name ("action1") is displayed.

In my opinion the GUI should validate the length of the name before trying to submit it to the database thus avoiding the technical error.
I'll report this to Sparx in a bug report.

Geert

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: SQL error when element name > 255 characters
« Reply #1 on: August 03, 2009, 04:15:34 pm »
Tested in version 847 and this issue is now fixed.
(could have been fixed earlier)

Geert