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
 how to retrieve values from a text datatype column

Author  Topic 

chloe
Starting Member

3 Posts

Posted - 2003-05-07 : 21:38:23
please explain how to use the text datatype. it's just so confusing. i can't understand how i can update a column with that datatype... Help!

someone said that i should use textcopy.exe to insert values. is that my only hope?

i'm actually looking for tutorials on how to insert/update/retrieve data from a column holding text data type. if you have any idea, i would deeply appreciate your help.

on the other hand, if textcopy.exe is the only way, how am i suppose to use it? my interface is written in VB, do i run it there? are there tutorials available?

thanks!!!

robvolk
Most Valuable Yak

15732 Posts

Posted - 2003-05-07 : 23:00:14
Well, for one thing, it would help to know what you're storing in that column, and if you really NEED to store more than 8,000 characters. If you don't, then you can use a varchar column to store up to 8,000 characters, and you'll be able to update it just like any other column.

Actually, ADO makes working with text data pretty easy, but it's no fun on the SQL Server side if you're using stored procedures or want to manipulate it. Books Online details the READTEXT, WRITETEXT, and UPDATETEXT commands, and the ADO documentation discusses using text data (might be called long varchar or something similar) Also search SQL Team for "using text columns", you should get a couple of articles describing how to use it with ADO.

Go to Top of Page

chloe
Starting Member

3 Posts

Posted - 2003-05-08 : 02:31:42
thanks very much. my groupmate and i are giving up on this text datatype idea. we're going back to using varchar.

Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2003-05-09 : 12:16:31
Rob (or anyone),

When you do a simple SELECT of a text column, doesn't it return the first 32k stored as a default?



Brett

8-)
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2003-05-09 : 19:09:29
Hmmmm, not 100% sure, but that could be right. I think that might be a holdover from an earlier version (6.0 or earlier), but when you use ADO it will retrieve the entire contents from a text column. QA is another story, it never returns more than 8000 characters from a column, and I can't say I'm sorry about that, it's damned hard enough reading 1000 character columns in it.

Go to Top of Page
   

- Advertisement -