Re: Size of data field - SQL Sever 2000

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Ron Hinds (__NoSpam_at___NoSpamramac.com)
Date: 05/14/04


Date: Fri, 14 May 2021 16:26:58 -0700

"Hans" <hjkiesouw_Not_@yahoo.com> wrote in message
news:c6qih4$l11$1@ctb-nnrp2.saix.net...
> 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.

>
> Thanks
>
> Hans
>
> "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
> news:ej2wpf9KEHA.268@TK2MSFTNGP10.phx.gbl...
> > 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)?
> >
> > --
> > Doug Steele, Microsoft Access MVP
> > http://I.Am/DougSteele
> > (No private e-mails, please)
> >
> >
> >
> > "Hans" <hjkiesouw_Not_@yahoo.com> wrote in message
> > news:c6i4br$d5n$1@ctb-nnrp2.saix.net...
> > > Hi Douglas,
> > > I tried this, but there still seems to be a limit to the number of
> > characters.
> > > Any other possible solution?
> > >
> > > Hans
> > >
> > > "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in
message
> > > news:%23CKIbiRKEHA.2144@TK2MSFTNGP10.phx.gbl...
> > > > text (or ntext if you need unicode)
> > > >
> > > >
> > > > --
> > > > Doug Steele, Microsoft Access MVP
> > > > http://I.Am/DougSteele
> > > > (No private e-mails, please)
> > > >
> > > >
> > > >
> > > > "Hans" <hjkiesouw_Not_@yahoo.com> wrote in message
> > > > news:c6a369$m68$1@ctb-nnrp2.saix.net...
> > > > > 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
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Relevant Pages

  • Re: SQL Datatypes
    ... stored as a varchar, data that should be stored as a float is stored ... The exact validation is different depending on data type. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • RE: Sql Linked Server
    ... changing table data type from nvarchar to varchar. ... you said you will still meet the error with DTS Query Builder. ...
    (microsoft.public.sqlserver.odbc)
  • Re: Dynamic Parameters S.P.
    ... >nvarchar value 'TEST' to a column of data type bit. ... I assume that all columns here are char, varchar nchar or nvarchar, except ... then datatype precedence decides which is converted to what. ...
    (microsoft.public.sqlserver.programming)
  • Upsizing Wizard tries to Convert Memo Field to Date/Time vs nvarchar
    ... converting data type varchar to datetime. ... to specify nvarchar or varchar as the receiving data type & I don't know ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Oh... no....
    ... >>> the data type of the date_variable in stored proc have been set to ... >>> and using weather CAST or CONVERT to change the char to datetime ... >>> Syntax error converting datetime from character string. ...
    (microsoft.public.sqlserver.programming)