Sql 2000 'text' datatype
-
I need to utilize the text datatype, as i'm storing a very large amount of text data in a table. however, the designer keeps defaulting to a length of '16', and will not go any bigger. Am I doing something wrong? I am at this time attempting to hard code data to the table as I'm archiving a lot of information, then i'll build the .aspx pages to keep it updated with the current data. If this doesn't work, i'll have to create 5 or 6 varchar rows, and i would rather avoid that. this field will be searchable eventually. Thanks for any help you can offer. karinb
-
I need to utilize the text datatype, as i'm storing a very large amount of text data in a table. however, the designer keeps defaulting to a length of '16', and will not go any bigger. Am I doing something wrong? I am at this time attempting to hard code data to the table as I'm archiving a lot of information, then i'll build the .aspx pages to keep it updated with the current data. If this doesn't work, i'll have to create 5 or 6 varchar rows, and i would rather avoid that. this field will be searchable eventually. Thanks for any help you can offer. karinb
karinb wrote:
he designer keeps defaulting to a length of '16'
Although that is the length set by the designer, it is not the length allowed for data storage. Try storing your data...you will see that it fits just fine. SQL Server Booksonline Unless the text in row option is specified, text, ntext, or image strings are large character or binary strings (up to 2 gigabytes) stored outside a data row. The data row contains only a 16-byte text pointer that points to the root node of a tree built of internal pointers that map the pages in which the string fragments are stored. For more information about the storage of text, ntext, or image strings, see text, ntext, and image Data. ---------- There go my people. I must find out where they are going so I can lead them. - Alexander Ledru-Rollin
-
I need to utilize the text datatype, as i'm storing a very large amount of text data in a table. however, the designer keeps defaulting to a length of '16', and will not go any bigger. Am I doing something wrong? I am at this time attempting to hard code data to the table as I'm archiving a lot of information, then i'll build the .aspx pages to keep it updated with the current data. If this doesn't work, i'll have to create 5 or 6 varchar rows, and i would rather avoid that. this field will be searchable eventually. Thanks for any help you can offer. karinb
You don't have the "Text In Row" option turned on do you? SQL Server Booksonline You enable the text in row option for a table by using
sp_tableoption
. With the text in row option set to ON, Microsoft® SQL Server 2000 stores text, ntext, or image strings directly in the data row ---------- There go my people. I must find out where they are going so I can lead them. - Alexander Ledru-Rollin -
You don't have the "Text In Row" option turned on do you? SQL Server Booksonline You enable the text in row option for a table by using
sp_tableoption
. With the text in row option set to ON, Microsoft® SQL Server 2000 stores text, ntext, or image strings directly in the data row ---------- There go my people. I must find out where they are going so I can lead them. - Alexander Ledru-Rollin -
please explain how to do that, i do not know where i would look to enable that feature. Thank you. karinb
You do not want it on, you want it off. Have you actually tried to store your data? Do you receive an error? Try this from the query anazyzer:
sp_tableoption N'TableName', 'text in row', 'OFF'
---------- There go my people. I must find out where they are going so I can lead them. - Alexander Ledru-Rollin -
You don't have the "Text In Row" option turned on do you? SQL Server Booksonline You enable the text in row option for a table by using
sp_tableoption
. With the text in row option set to ON, Microsoft® SQL Server 2000 stores text, ntext, or image strings directly in the data row ---------- There go my people. I must find out where they are going so I can lead them. - Alexander Ledru-RollinI disabled the 'text in row'. I reset my field to 'text', and the length changed to '16'. Now, in the field when i open the table, this is in the box, and i am unable to enter my data into the field. i am confused, why wouldn't it allow me to declare text and then put all my data in the row? i thought text held over 2bill chars? karinb -- modified at 17:45 Monday 17th April, 2006
-
You do not want it on, you want it off. Have you actually tried to store your data? Do you receive an error? Try this from the query anazyzer:
sp_tableoption N'TableName', 'text in row', 'OFF'
---------- There go my people. I must find out where they are going so I can lead them. - Alexander Ledru-Rollinto answer this, no, i don't get an error at all, just am not able to put any data into the field if it is set for 'text'. the words, Long Text, are in the field instead. Is this just some sort of link to the actual data? how do I see if it is in there? I am actually copying/pasting text from a document and it includes some html tags. would that cause a problem? thank you. karinb
-
to answer this, no, i don't get an error at all, just am not able to put any data into the field if it is set for 'text'. the words, Long Text, are in the field instead. Is this just some sort of link to the actual data? how do I see if it is in there? I am actually copying/pasting text from a document and it includes some html tags. would that cause a problem? thank you. karinb
karinb wrote:
I am actually copying/pasting text from a document and it includes some html tags. would that cause a problem?
Yes. Some of the characters in the html are probably causing the problem. Try using the query analyzer, or some other tool, to get/set the data. The enterprise manager isn't a very good tool for data manipulation. Gotta go for the day. Bye. ---------- There go my people. I must find out where they are going so I can lead them. - Alexander Ledru-Rollin