in

The ORM Foundation

Get the facts!

Length of 0 for varying char

Last post Sat, Feb 3 2007 18:56 by Brian Nalewajek. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • Mon, Nov 20 2006 13:42

    • jmag
    • Top 50 Contributor
    • Joined on Sat, Mar 8 2008
    • Posts 13

    Length of 0 for varying char

    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.
  • Mon, Nov 20 2006 18:58 In reply to

    RE: Length of 0 for varying char

    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..
  • Sat, Feb 3 2007 18:56 In reply to

    RE: Length of 0 for varying char

    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..
Page 1 of 1 (3 items)
© 2008-2024 ------- Terms of Service