Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Sql 2000 'text' datatype

Sql 2000 'text' datatype

Scheduled Pinned Locked Moved Database
databasehelpquestion
8 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    karinb
    wrote on last edited by
    #1

    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

    E 2 Replies Last reply
    0
    • K 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

      E Offline
      E Offline
      Eric Dahlvang
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • K 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

        E Offline
        E Offline
        Eric Dahlvang
        wrote on last edited by
        #3

        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

        K 2 Replies Last reply
        0
        • E Eric Dahlvang

          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

          K Offline
          K Offline
          karinb
          wrote on last edited by
          #4

          please explain how to do that, i do not know where i would look to enable that feature. Thank you. karinb

          E 1 Reply Last reply
          0
          • K karinb

            please explain how to do that, i do not know where i would look to enable that feature. Thank you. karinb

            E Offline
            E Offline
            Eric Dahlvang
            wrote on last edited by
            #5

            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

            K 1 Reply Last reply
            0
            • E Eric Dahlvang

              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

              K Offline
              K Offline
              karinb
              wrote on last edited by
              #6

              I 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

              1 Reply Last reply
              0
              • E Eric Dahlvang

                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

                K Offline
                K Offline
                karinb
                wrote on last edited by
                #7

                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

                E 1 Reply Last reply
                0
                • K 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

                  E Offline
                  E Offline
                  Eric Dahlvang
                  wrote on last edited by
                  #8

                  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

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups