Tuesday, February 21, 2012

rtf

I'm filling richtextbox with data.
I want to save it into database, but I don't know wich type of field shoul I
use in table to store that kind of data?Well, is there a limit to how much text people can enter into this
field? Also, do you anticipate that the amount of text entered will
vary a lot (e.g. some people will enter a little, some a lot and
possibly some could enter nothing)?
If people aren't allowed to enter more than 8000 characters then you
can use CHAR or VARCHAR data types. If the amount entered by people
could vary a lot then use VARCHAR and set the maximum size of the field
to the maximum number of characters you anticipate people entering. If
the amount people will enter does not vary much then use CHAR set the
maximum size of the field to the maximum you anticipate people
entering.
Anything larger than 8000 characters you should probably consider using
the "text" data type.
Hope that helps a bit.

No comments:

Post a Comment