Book a Demo

Author Topic: Element.Name Max Len sometimes 255?  (Read 3707 times)

nkea

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Element.Name Max Len sometimes 255?
« on: January 19, 2006, 09:27:11 pm »
I caught this when using pre-existing tests (for our EA Addin) with (I admit) an unlikely Requirement Element.Name with 800 characters.

RIght after  I created the element its name's length was OK, ie after:

EA.Element add_new_elem = (EA.Element)pkg.Elements.AddNew(largename, "Requirement");
pkg.Elements.Refresh();
// here add_new_elem.Name and it's length are fine

But when I retrieved the same element using  eg

EA.Element get_by_id_elem = (EA.Element) earep.GetElementByID(add_new_elem.ElementID);
// here get_by_id_elem.Name has been truncated to a length of 255

The same truncation occurs when I use GetAt to traverse all the elements in a package - names > 255 chars long are truncated.

If that's a  real limit, fine - I agree in real life a 'name' longer than 255 is questionable. But maybe the behaviour should be more consistent (and documented, unless I missed something).  

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Element.Name Max Len sometimes 255?
« Reply #1 on: January 22, 2006, 01:02:48 pm »
The database field behind the name field is limited to 255 characters.