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
 Development Tools
 ASP.NET
 SQL-Server Text datatype

Author  Topic 

ofsouto
Starting Member

22 Posts

Posted - 2005-03-14 : 10:28:13
Hi, dear

I need to get the value of a text datatype collumn in a SQL-Server table.
The text length is 2196 characters, but when I try to get it by datareader or dataset the text
length is 696.
What's wrong? How can I get the full text?

Thank you very much.

Obede
Brazil

X002548
Not Just a Number

15586 Posts

Posted - 2005-03-14 : 10:32:34
Is it 1500 bytes of space?

Try SELECT LEN(CONVERT(varchar(8000), Colname)-REPLACE(CONVERT(varchar(8000), Colname),' ',''))

And tell us what you get....



Brett

8-)
Go to Top of Page

ofsouto
Starting Member

22 Posts

Posted - 2005-03-14 : 11:56:00
Thank's Brett

I just need to get the text of a text data type collumn when executing a query. I can get it by datareader or dataset.

select collumn_A from table_A where cod = "A"

The text data type can have a length of 2147483647 characters.

I'm getting 696 characters when the text collum has 2196 characters.

Thank you very much

Obede
Brazil
Go to Top of Page
   

- Advertisement -