Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text DataType 1

Status
Not open for further replies.

4181944

Programmer
Aug 6, 2002
9
NZ
Hi All,

I designed a table and chosed TEXT as DataType for one field(e.g story1). The default size for the TEXT is 16 bytes, I am not able to change it. When I use Stored Procedure to insert data to db, it only stored 16 characters in that field. How can i create a TEXT DataType without length specified and let me store indefinite text?

Thanks for advice

Richard
 
The 16 bytes stored in the table represents a pointer to the text, not the text itself. Text and image datatypes use different functions to access data: READTEXT, UPDATETEXT, WRITETEXT. Check out BOL for how to use these commands to store large amounts of text or image data.

IMHO it's more trouble than it's worth. If you're running SQL2K, you may consider a varchar(8000) column. It's limited, but not exactly small.
--Angel
-----------------------------------
SELECT * FROM users WHERE clue > 0
0 row(s) selected
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top