Menu

NVarchar size doubled on schema reports

Wysiwyg
2004-11-24
2013-04-25
  • Wysiwyg

    Wysiwyg - 2004-11-24

    FYI: The reported size of NVarchar columns is doubled on the schema reports.

     
    • Wysiwyg

      Wysiwyg - 2004-12-28

      I suggest the following:

      Change the columns-for-table query in sqlserver2000statements.xml needs to add columns for syscolumns.prec and syscolumns.scale.

      In SqlBuddy.App.DatabaseShema public override void Stuff( Table table ) the query is executed. I'd suggest leaving the actual numeric width and length properties alone and changing the code to make the added Length property string equal to a user-friendly length field. I.e. for Unicode nvarchar,nchar, and ntext use the precision. For decimal, number, float, money, smallmoney, and real use precision + "," + scale. I think everything else can just use the length as-is. I'm not addressing user-defined types should anyone go there.

      Next, in SqlBuddy.App.Commands replace instances of column.Width with column.FindProperty("Length").Value. If null values are possible use something like (column.FindProperty("Length") != null)?column.FindProperty("Length").Value:'0'). Of course, this shouldn't be null. :-)

       
      • CAZ Software

        CAZ Software - 2005-01-05

        Sounds reasonable. I'll have a stab at it when I next get a moment.

        Cheers
        Jeff

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.