Text in news articles limit?

Last post 06-03-2008 7:23 AM by typhoid. 3 replies.

Sort Posts:

  • Text in news articles limit?

    05-02-2005, 10:09 AM
    • Loading...
    • dotnetdummy
    • Joined on 05-02-2005, 2:07 PM
    • Posts 1

    Is there a limit on how much text can be typed in the news articles? It seems if i type more then a paragraph that it will not save it. I don't receive an error and the change doesn't get committed to the db.

    Regards,

    Chris

  • Re: Text in news articles limit?

    05-03-2005, 4:24 PM
    • Loading...
    • samsp
    • Joined on 08-08-2002, 5:35 PM
    • Posts 330
    • AspNetTeam

    Check the length of the field in the database schema. If the text is too long then the commit is rejected.

    Sam

  • Re: Text in news articles limit?

    05-13-2008, 3:53 PM
    • Loading...
    • riscfl
    • Joined on 05-13-2008, 7:41 PM
    • Posts 6

    The out of the box limit is 8000 characters, which includes the text you write as well as the supporting HTML that is generated and stored in the Announcements.Description field in your database.

    I changed the limit for myself by

    1. Changing the database column from varchar(8000) to varchar(MAX)
    2. Change Accouncements.vb under \App_Code\DAL\Generated to support the change in length you want where the dimension is declared.
                   
                    Dim colvarDescription As TableSchema.TableColumn = New TableSchema.TableColumn(schema)
                    colvarDescription.ColumnName = "description"
                    colvarDescription.DataType = DbType.String
                    colvarDescription.MaxLength = xxxxxxx
     
                   colvarDescription.AutoIncrement = false
                    colvarDescription.IsNullable = true
                    colvarDescription.IsPrimaryKey = false
                    colvarDescription.IsForeignKey = false
                    colvarDescription.IsReadOnly = false

     

     

  • Re: Text in news articles limit?

    06-03-2008, 7:23 AM
    • Loading...
    • typhoid
    • Joined on 08-10-2006, 9:14 AM
    • Posts 73

    riscfl:

    The out of the box limit is 8000 characters, which includes the text you write as well as the supporting HTML that is generated and stored in the Announcements.Description field in your database.

    The original club starter kit had a really small limit for news articles (less than 8000 characters, but I don't remember exactly what it was).  Unfortunately, it also doesn't do much error checking, so if you go over the limit the article is silently discarded.

    riscfl:

    1. Changing the database column from varchar(8000) to varchar(MAX)

    I might be wrong, but I think that the maximum size of a varchar in MS SQL is 8000 chars, so the above statement doesn't seem to make sense.

    riscfl:

    2. Change Accouncements.vb under \App_Code\DAL\Generated to support the change in length you want where the dimension is declared.
                   
                    Dim colvarDescription As TableSchema.TableColumn = New TableSchema.TableColumn(schema)
                    colvarDescription.ColumnName = "description"
                    colvarDescription.DataType = DbType.String
                    colvarDescription.MaxLength = xxxxxxx
     
                   colvarDescription.AutoIncrement = false
                    colvarDescription.IsNullable = true
                    colvarDescription.IsPrimaryKey = false
                    colvarDescription.IsForeignKey = false
                    colvarDescription.IsReadOnly = false

    This is for CSK 2+, not the original CSK.

    If you need more than varchar(MAX), which I think is 8000 characters, then you can switch to the database column type 'text', which is virtually unlimited.

Page 1 of 1 (4 items)