Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2006

    Unanswered: problem accessing a column of type ntext

    I am working on an application which accesses SQL database. I have a table complaint in which i have a coulmn 'history' of type "ntext". When i insert a value, the value gets stored in the db correctly, but I cannot access the complete data from that field using a simple select query. I had to export the table to a text file only then i could view the complete data of the field.
    I wrote the query in query analyzer as:
    "select history from complaint where pkey=142"
    & the result i got is:
    ###### admin: Jan 8, 2007 3:53:57 PM GMT Type: Inactive (Key 10) Description: Activity yet to be started State: Planned "

    This is only a part of the entire string that I had entered.

    My requirement is that I need to access the data from the ntext field & save it in a variable & then display the entire data in my application. Can anyone tell me how should i use the select query so that i get the entire data without having to go thru the export data procedure.
    Please help!!!

  2. #2
    Join Date
    Jun 2003
    Provided Answers: 1
    Most likely your results are just being truncated for display by Query Analyzer.

    In QA, choose Tools/Options from the menu system, go to the RESULTS tab, and bump up the MAXIMUM CHARACTERS PER COLUMN value.

    Regardless, this should not affect the operation of your code.
    If it's not practically useful, then it's practically useless.

    blindman "sqlblindman"

  3. #3
    Join Date
    Feb 2004
    In front of the computer
    Provided Answers: 54
    You are probably using Query Analyzer or one of its counterparts. They artificially limit the amount of text returned on a per-column basis in order to improve performance and allow the code to work with result sets of arbitrary size. You can alter the portion of the column that is returned to the client, but where and how you set that varies from tool to tool.

    You should not have any problem in your application code, but if you do the solution is simply to alter a setting in your data library, I've never needed to change code to support text or ntext.


Posting Permissions

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