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 table field

SQL table field

Scheduled Pinned Locked Moved Database
databasequestion
10 Posts 4 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
    kirthikirthi
    wrote on last edited by
    #1

    Hi all I am using SQL 2000 ver. How can i store large text data in my table field . What are the field propertys i have to use Thank you

    Kirthi

    modified on Thursday, July 31, 2008 2:04 AM

    V 1 Reply Last reply
    0
    • K kirthikirthi

      Hi all I am using SQL 2000 ver. How can i store large text data in my table field . What are the field propertys i have to use Thank you

      Kirthi

      modified on Thursday, July 31, 2008 2:04 AM

      V Offline
      V Offline
      Vimalsoft Pty Ltd
      wrote on last edited by
      #2

      e.g Use Mystring VarChar(200) You can add as much string as you can and can increase a dimension.

      Vuyiswa Maseko, Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding VB.NET/SQL7/2000/2005 http://vuyiswamb.007ihost.com http://Ecadre.007ihost.com vuyiswam@tshwane.gov.za

      K 1 Reply Last reply
      0
      • V Vimalsoft Pty Ltd

        e.g Use Mystring VarChar(200) You can add as much string as you can and can increase a dimension.

        Vuyiswa Maseko, Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding VB.NET/SQL7/2000/2005 http://vuyiswamb.007ihost.com http://Ecadre.007ihost.com vuyiswam@tshwane.gov.za

        K Offline
        K Offline
        kirthikirthi
        wrote on last edited by
        #3

        Hi thank you for reply but i want to put the table field length greater that 10,000 because my data is more to store thank you

        Kirthi

        V 1 Reply Last reply
        0
        • K kirthikirthi

          Hi thank you for reply but i want to put the table field length greater that 10,000 because my data is more to store thank you

          Kirthi

          V Offline
          V Offline
          Vimalsoft Pty Ltd
          wrote on last edited by
          #4

          hi SQL Fields are not like Storing data in a text file. So if you probably tried to add a dimension of 20000 and get an error like this

          The size (20000) given to the column 'name' exceeds the maximum allowed for any data type (8000).

          You should know that the Limit is "8000", and i dont understand why would you store such a large string in a Database. So its not Possible with SQL

          Vuyiswa Maseko, Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding VB.NET/SQL7/2000/2005 http://vuyiswamb.007ihost.com http://Ecadre.007ihost.com vuyiswam@tshwane.gov.za

          K 1 Reply Last reply
          0
          • V Vimalsoft Pty Ltd

            hi SQL Fields are not like Storing data in a text file. So if you probably tried to add a dimension of 20000 and get an error like this

            The size (20000) given to the column 'name' exceeds the maximum allowed for any data type (8000).

            You should know that the Limit is "8000", and i dont understand why would you store such a large string in a Database. So its not Possible with SQL

            Vuyiswa Maseko, Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding VB.NET/SQL7/2000/2005 http://vuyiswamb.007ihost.com http://Ecadre.007ihost.com vuyiswam@tshwane.gov.za

            K Offline
            K Offline
            kirthikirthi
            wrote on last edited by
            #5

            hi ya i know the error but just i am conforming is there any other way is there to store like acces (memo field) thank you

            Kirthi

            A 1 Reply Last reply
            0
            • K kirthikirthi

              hi ya i know the error but just i am conforming is there any other way is there to store like acces (memo field) thank you

              Kirthi

              A Offline
              A Offline
              Ashfield
              wrote on last edited by
              #6

              There is. Try the ntext data type. ntext Variable-length Unicode data with a maximum length of 2^30 - 1 (1,073,741,823) characters. Storage size, in bytes, is two times the number of characters entered. The SQL-2003 synonym for ntext is national text. BUT Important: ntext, text, and image data types will be removed in a future version of Microsoft SQL Server. Avoid using these data types in new development work, and plan to modify applications that currently use them. Use nvarchar(max), varchar(max), and varbinary(max) instead. For more information, see Using Large-Value Data Types.

              Bob Ashfield Consultants Ltd

              V R 2 Replies Last reply
              0
              • A Ashfield

                There is. Try the ntext data type. ntext Variable-length Unicode data with a maximum length of 2^30 - 1 (1,073,741,823) characters. Storage size, in bytes, is two times the number of characters entered. The SQL-2003 synonym for ntext is national text. BUT Important: ntext, text, and image data types will be removed in a future version of Microsoft SQL Server. Avoid using these data types in new development work, and plan to modify applications that currently use them. Use nvarchar(max), varchar(max), and varbinary(max) instead. For more information, see Using Large-Value Data Types.

                Bob Ashfield Consultants Ltd

                V Offline
                V Offline
                Vimalsoft Pty Ltd
                wrote on last edited by
                #7

                hi Ashfield Wow is it Possible? can i see an example code, because ntext even if you try 10000,it will not work, mybe am not doing it right see

                create table #test
                (
                P_ID int null,
                Pname ntext(10000) null
                )

                Msg 131, Level 15, State 2, Line 5 The size (10000) given to the column 'Pname' exceeds the maximum allowed for any data type (8000). Thanks

                Vuyiswa Maseko, Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding VB.NET/SQL7/2000/2005 http://vuyiswamb.007ihost.com http://Ecadre.007ihost.com vuyiswam@tshwane.gov.za

                A 1 Reply Last reply
                0
                • V Vimalsoft Pty Ltd

                  hi Ashfield Wow is it Possible? can i see an example code, because ntext even if you try 10000,it will not work, mybe am not doing it right see

                  create table #test
                  (
                  P_ID int null,
                  Pname ntext(10000) null
                  )

                  Msg 131, Level 15, State 2, Line 5 The size (10000) given to the column 'Pname' exceeds the maximum allowed for any data type (8000). Thanks

                  Vuyiswa Maseko, Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding VB.NET/SQL7/2000/2005 http://vuyiswamb.007ihost.com http://Ecadre.007ihost.com vuyiswam@tshwane.gov.za

                  A Offline
                  A Offline
                  Ashfield
                  wrote on last edited by
                  #8

                  If you read up, your syntax is wrong

                  create table #b(a ntext)

                  Bob Ashfield Consultants Ltd

                  1 Reply Last reply
                  0
                  • A Ashfield

                    There is. Try the ntext data type. ntext Variable-length Unicode data with a maximum length of 2^30 - 1 (1,073,741,823) characters. Storage size, in bytes, is two times the number of characters entered. The SQL-2003 synonym for ntext is national text. BUT Important: ntext, text, and image data types will be removed in a future version of Microsoft SQL Server. Avoid using these data types in new development work, and plan to modify applications that currently use them. Use nvarchar(max), varchar(max), and varbinary(max) instead. For more information, see Using Large-Value Data Types.

                    Bob Ashfield Consultants Ltd

                    R Offline
                    R Offline
                    RyanEK
                    wrote on last edited by
                    #9

                    Hi Bob, Do you have more information on the future non-use of those fields you described? Thanks. Ryan

                    A 1 Reply Last reply
                    0
                    • R RyanEK

                      Hi Bob, Do you have more information on the future non-use of those fields you described? Thanks. Ryan

                      A Offline
                      A Offline
                      Ashfield
                      wrote on last edited by
                      #10

                      Check out BOL

                      Bob Ashfield Consultants Ltd

                      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