text field in sql server 2000

  • Hi all,

    I am trying to use text field to save a chunk of data from our on-line application.

    The purpose the data will be save in the database in case of the transaction is not successful, so we don't have to ask user to send  ud application again. we can recover the interrupted transaction based on the data was saved in the system.

    What is the max length of the text field. I saw that  in our system, the length is set up to 17 while the length of the characters is many more than that.

     

    Thank you.

    Betty

  • if you are using the text datatype, there is no practical limit to how big a string will fit in it. same with ntext.

    the ones that are limited are char/varchar/nchar/nvarchar. these are limited to 8000 bytes.

    ---------------------------------------
    elsasoft.org

  • What is the max length of the text field. I saw that  in our system, the length is set up to 17 while the length of the characters is many more than that.
    if you sp_help a table and see the text field has a "length" of 16;
    that is size in bytes of the pointer that has the address of where the data is really stored. the "length" property can be misleading if you are refering to anything that is not a CHAR,VARCHAR field.
     

    Column_nameTypeComputedLengthPrecScaleNullableTrimTrailingBlanksFixedLenNullInSourceCollation
    ATBLKEYintno410 0 no(n/a)(n/a)NULL
    ANBRvarcharno18nononoSQL_Latin1_General_CP1_CI_AS
    ANAMEvarcharno40yesnonoSQL_Latin1_General_CP1_CI_AS
    ADESCRIPtextno16yes(n/a)(n/a)SQL_Latin1_General_CP1_CI_AS

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Hello jezemine and Lowell,

    Thank you both for clarifying this for me. Very very helpful.

    Betty

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply