Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2003
    Posts
    21

    Unanswered: Having issue inserting large text colum into DB

    I have a large text colum I am trying to insert into a DB
    This colum is about 800 chars longs

    I have set the colum type in the table to text

    I have set the table option for text in row to on

    I have set the table option for text in row to 1000

    But it is still chopping the text at the 256 char mark on insert.

    Anyone have any ideas ?? This is SQL 2000.

    Chris

  2. #2
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    Are you sure it does? How do you check for the length of the inserted value? By doing SELECT?

    Try this:

    select datalength(<your_text_field>) from <your_table>

    And why do you need TEXT IN ROW setting? Are you searching on that field? If that's the case, - you should implement Full-Text Search.
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

  3. #3
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    In Query Analyzer:

    1) press Shift-Ctrl-O to bring up the Options dialog.
    2) Click on the Results tab
    3) Check the value of the Maximum Characters per Column

    If it is too small, make it larger, but keep in mind that this is a VERY RAM expensive operation in the GUI. Don't make it any larger than 255 unless you really need it!

    -PatP

  4. #4
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    Quote Originally Posted by Pat Phelan
    In Query Analyzer:

    1) press Shift-Ctrl-O to bring up the Options dialog.
    2) Click on the Results tab
    3) Check the value of the Maximum Characters per Column

    If it is too small, make it larger, but keep in mind that this is a VERY RAM expensive operation in the GUI. Don't make it any larger than 255 unless you really need it!

    -PatP
    That's why I suggested to use DATALENGTH, because it does not rely on this setting. Besides, what if the value that is inserted greater than 8192? Or you'd think that you inserted 8192 characters?
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

  5. #5
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Quote Originally Posted by rdjabarov
    That's why I suggested to use DATALENGTH, because it does not rely on this setting. Besides, what if the value that is inserted greater than 8192? Or you'd think that you inserted 8192 characters?
    You did fine, as far as giving them what they needed to figure out the answer. I just like my solution better because then they can SEE the answer, which is often better than being able to deduce it.

    -PatP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •