Forum Moderators: open

Message Too Old, No Replies

Field type for message board posts

Site redesign using SQL Server 2000

         

dataguy

4:45 pm on Jan 6, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm in the middle of redesigning a website which is similar to a message board/forum and uses SQL Server 2000.

Currently each post is saved in a varchar field with a length of 2000, which works for most posts, but sometimes the topics require longer posts and the members get annoyed at the limitation.

I'd use a text field to allow unlimited length but most of the posts are one or two sentences and it seems like this would be overkill.

I've never read any advice on this dilemma, though it can't be an uncommon situation.

Any suggestions?

txbakers

2:28 am on Jan 7, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Unfortunately, you can't have it both ways. I'd opt for the text field.

syber

7:52 pm on Jan 9, 2007 (gmt 0)

10+ Year Member



Since a VARCHAR can have up to 8000 bytes, the easy solution is to increase the size of the column. It won't have the capacity of a TEXT data type, but it will be 4 times what you have now.