Size of data field - SQL Sever 2000

  • Thread starter Thread starter Hans
  • Start date Start date
H

Hans

Hi all,
What format should I use for a text field that will allow for more than 8,000
characters?
I have a db that contains text for a web site and find that the VARCHAR format
limits the filed to 8,000. Is there another text format that does not have such
a limit?

Thanks
Hans
 
Hi Douglas,
I tried this, but there still seems to be a limit to the number of characters.
Any other possible solution?

Hans
 
Here are the specs for the text data type from BOL:

Variable-length non-Unicode data in the code page of the server and with a
maximum length of 2^31-1 (2,147,483,647) characters. When the server code
page uses double-byte characters, the storage is still 2,147,483,647 bytes.
Depending on the character string, the storage size may be less than
2,147,483,647 bytes.

Is that too limited for you?

Are you using AppendChunk (and GetChunk)?
 
Hi Douglas,

I use a form that a user completed that will insert a whole bunch of text. I
never know how long the text will be and I tried to change the field from a
VARCHAR to TEXT and got a warning that data would be truncated. It also shows a
max length of "16" where I can set the VARCHAR to "8,0000".

The problem I have is that the text field allows the pasting of word docs and
uses the word format, which usually bloats the file something horrific.

Thanks

Hans
 
Hans said:
Hi Douglas,

I use a form that a user completed that will insert a whole bunch of text. I
never know how long the text will be and I tried to change the field from a
VARCHAR to TEXT and got a warning that data would be truncated. It also shows a
max length of "16" where I can set the VARCHAR to "8,0000".

Max Length is 16 because the Text data type doesn't actually store the data,
it's storing a (16-byte) pointer.
The problem I have is that the text field allows the pasting of word docs and
uses the word format, which usually bloats the file something horrific.

In that case, you need to use the SQL IMAGE data type, which is binary (as
opposed to text) data.
 
Back
Top