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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Long text insert and retrival on sql 2000

Status
Not open for further replies.

philrm

MIS
Jun 1, 1999
58
AU
Hi all

How can you specify a higher length for datatypes text and ntext using SQL server 2000. I have used the sp_tableoptions to increase the available characters to 7000

sp_tableoption tablename text in row 7000

however I need about 10,000 characters. How do I insert and retrive the information to the field?
I am trying to set up the text to extract from the database to the web. It is run via coldfusion 5 but is static data not for changing.
 
If you had not turned on text in row you could store any length. Turn it back off again. You apparently have confused varchars and text fields.
 
Hi fluteplr
What do you mean by the first line "If you had not turned on text in row you could store any length. " I have the same problem. Can you please specific using screen captures. Thank's

From
yogi
 
You my be right I am confused. When I created the table with the fields at text fields they displayed a leangth of 16. I assume this is refering to the 16 bit pointer to the page that holds the actual text. Why I say this is that the field would not display more than 16 characters??? I am sure I have messed this up badly some where but BOL just seems to be a little hard to grasp on this issue. I'm sure it is me!!!! Any guidance would be appreciated
 
By default text fields and image fields will hold any lenght of characters. You are correct the 16 refers to the length of the pointer, which is how much room the field takes up in the row in the table. When you say the field would not display more than 16 characters what are you refering to?
 
Hi fluteplr

"When you say the field would not display more than 16 characters what are you refering to?"

What I mean by this is that I cannot put more than the 16 length.

**I need to paste 10,000 to 15,000 characters in using this datatype. I have read about the text and ntext datatypes, it is saying that it can hold 2 billion character but currently it not holding anything for than 16 in lenght. So therefore how can I solve this problem. I hope this make it clearer to you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top