Not getting all the ntext data when I select on that field

Posted on 2007-07-30
Last Modified: 2008-02-01
Hello all,

I've got a column of type ntext (length is 16 if that matters).  I'm selecting it, but all the data is not being returned to my query.  

Normally this column contains long descriptions (not crazy long, maybe in the hundreds of characters at the most).

I have a simple Access front end which displays this text in it's entirety just fine, but when I "select columnName from table for xml raw" I'm getting back incomplete data in the Query Analyzer for those rows where the description is longer than 100 characters or so (haven't counted).

I need to get XML output from the query containing complete data so I can use the XML downstream.
 How can I get complete data?

Thanks for any hints!
Question by:vlg
    LVL 13

    Accepted Solution

    From BOL:
    SET TEXTSIZE { number }
    Setting SET TEXTSIZE affects the @@TEXTSIZE function.
    The SQL Server ODBC driver and Microsoft OLE DB Provider for SQL Server automatically set TEXTSIZE to 2147483647 when connecting.

    In QA, by default text column is limited to 256 characters. Increase to 8192 on Resuls tab of Options.
    LVL 142

    Expert Comment

    by:Guy Hengel [angelIII / a3]
    >I've got a column of type ntext (length is 16 if that matters).
    note: the 16 is only the (fixed) size of the pointer, not of the data.
    text/ntext are stored outside the actual row data, and hence do not count as such for the row length.

    for the rest, ispaleny has given a good hint (points to him if that solved the trouble)

    Author Comment

    Thanks to you both.  

    FWIW, both tweaks were required in this case.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
    Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now