Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 displaying <long text> in column ntext ?

Author  Topic 

ann06
Posting Yak Master

171 Posts

Posted - 2012-04-18 : 03:16:13
hi,
I have a column which contains the body of emails, some records showing <long text> and am not able to process the data there.
how to show these data i tried in QA with the maximum no of records with no success !
also i tried in visual studio using data reader also getting <long text> !!
i also tried char [] buffer = dataReader.GetChars(9,0,buffer,0,100)
and the number or chars in the buffer was 11!!

is the data changed to be really "long text" ?

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2012-04-18 : 07:04:59
Hard to say why without seeing more details. If you do a select from the table in SQL Server Management Studio, how many characters does it show? SSMS cuts of the number of characters displayed. You can change how many characters are displayed via the menu Tools -> Options -> Query Results -> SQL Server -> Results To Grid (or Results To Text).

If that doesn't seem to help, run this query:
SELECT LEN(YourLongColumn) FROM YourTable
That will show how long the string is. See if that matches with your expectations.
Go to Top of Page
   

- Advertisement -