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 Server Management Studio R2 (varchar(MAX))

SQL Server Management Studio R2 (varchar(MAX))

Scheduled Pinned Locked Moved Database
databasesql-serversysadminhelp
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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    hi, i'm trying to create a program like notepad using visual basic. all of text body inside my note will be save in one cell in Sql Server Management Studio R2, but the max of varchar is varchar(8000), and there's varchar(MAX) too. nah if varchar(MAX) is bigger than 8000, may i know how many character it could save? i'm trying to understand this because i don't want any error caused by character overload. thankyou before. =)

    M L 2 Replies Last reply
    0
    • L Lost User

      hi, i'm trying to create a program like notepad using visual basic. all of text body inside my note will be save in one cell in Sql Server Management Studio R2, but the max of varchar is varchar(8000), and there's varchar(MAX) too. nah if varchar(MAX) is bigger than 8000, may i know how many character it could save? i'm trying to understand this because i don't want any error caused by character overload. thankyou before. =)

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      Instead of typing the question in here you could have done a search[^] on the keywords and caroused the results, they look quite useful to me.

      Never underestimate the power of human stupidity RAH

      L 1 Reply Last reply
      0
      • M Mycroft Holmes

        Instead of typing the question in here you could have done a search[^] on the keywords and caroused the results, they look quite useful to me.

        Never underestimate the power of human stupidity RAH

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        wow, thankyou for sharing that link. pretty cool way to tell someone to search.. :-D

        M 1 Reply Last reply
        0
        • L Lost User

          wow, thankyou for sharing that link. pretty cool way to tell someone to search.. :-D

          M Offline
          M Offline
          Mycroft Holmes
          wrote on last edited by
          #4

          Actually it's rather nasty but it does get the point across. There are guidelines at the top which give you the same information in a more polite fashion. You, like the rest of us, obviously don't read the manual and just dived right in, most newbies get introduced to LMGTFY. Anyway welcome to the site, may your questions be clear and interesting.

          Never underestimate the power of human stupidity RAH

          L 1 Reply Last reply
          0
          • M Mycroft Holmes

            Actually it's rather nasty but it does get the point across. There are guidelines at the top which give you the same information in a more polite fashion. You, like the rest of us, obviously don't read the manual and just dived right in, most newbies get introduced to LMGTFY. Anyway welcome to the site, may your questions be clear and interesting.

            Never underestimate the power of human stupidity RAH

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            btw, varchar(max) indicates that the maximum storage size is 2^31-1 bytes is that means 2,147,483,648 - 1 become 2,147,483,647 characters? and then i don't have to worry about character overload anymore?

            M 1 Reply Last reply
            0
            • L Lost User

              btw, varchar(max) indicates that the maximum storage size is 2^31-1 bytes is that means 2,147,483,648 - 1 become 2,147,483,647 characters? and then i don't have to worry about character overload anymore?

              M Offline
              M Offline
              Mycroft Holmes
              wrote on last edited by
              #6

              I should think that will be adequate for a NotePad style application :-D

              Never underestimate the power of human stupidity RAH

              L 1 Reply Last reply
              0
              • M Mycroft Holmes

                I should think that will be adequate for a NotePad style application :-D

                Never underestimate the power of human stupidity RAH

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #7

                okay, thankyou very much bro, god bless you.. :laugh:

                1 Reply Last reply
                0
                • L Lost User

                  hi, i'm trying to create a program like notepad using visual basic. all of text body inside my note will be save in one cell in Sql Server Management Studio R2, but the max of varchar is varchar(8000), and there's varchar(MAX) too. nah if varchar(MAX) is bigger than 8000, may i know how many character it could save? i'm trying to understand this because i don't want any error caused by character overload. thankyou before. =)

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  vkstarry wrote:

                  the max of varchar is varchar(8000)

                  Yup, anything longer than that would cripple the database-index when you do a LIKE operation. To keep it simple; the documents contents should be a varchar(max) (or nvarchar if you need to store unicode), and you should use strings that are limited in length to describe other properties (like a title).

                  Bastard Programmer from Hell :suss:

                  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