Help save net neutrality! Learn more.
Close

Length of 0 for varying char

jmag
2006-11-20
2013-05-28
  • jmag

    jmag - 2006-11-20

    i inadvertently did not specify a length for some nvarchar. i get no compile error but the resultant SQL Server DLL is invalid. there should be a warning/error if the length of nvarchar is 0 or better yet a default length of perhaps 50.

     
    • Brian Nalewajek

      Brian Nalewajek - 2006-11-20

      Hi,
        I ran into the same thing, but I don't know if it should be a model validation concern.  I'd think it would be vendor specific, as to how they implement a VARCHAR - maybe some use a default value, if it's set to zero?
        My guess is there is a slew of stuff that's planned for making mapping to specific RDBMS easier and better.  It would be good to get that validation in there somewhere.
        That one is a real gotcha.  BRN..

       
    • Brian Nalewajek

      Brian Nalewajek - 2007-02-03

      Hi,

        Just found out something helpful (maybe well known, but I was unaware): You can select a number of object types (by draging a rectangle, or clicking with CNTL key), then assign properties for for all of the selected object types at once.  It's a good way to assign a Data Type of say, (Text Variable, Length 50), to a whole set of objects.  The multiple selection is smart enough to only include property options that are common to the set sellected - but that's enough to assign Data Types.

        If you develop your model in pages, and keep the subject of the page more or less orthogonal, it makes it easier to layout all the FactTypes, then assign the Data Types in groups.

        This also helps avoid the DDL errors on physical implementation from length zero assignments.  You're less likely to forget an assignment when you do all the assignments on a page as a step in the process, than each individually.  BRN..

       

Log in to post a comment.