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. General Programming
  3. C#
  4. Is there some sort of limit involved?

Is there some sort of limit involved?

Scheduled Pinned Locked Moved C#
databasesql-serversysadminhelpquestion
5 Posts 3 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.
  • A Offline
    A Offline
    Adeel Chaudhry
    wrote on last edited by
    #1

    Hello! I am reading data from sql server in a string. but no matter how kuch the data is in the sql server, i am only getting 4000 characters. Is there some sort of limit involved in it? Tried playing with SqlConnection.PacketSize, but invained! Regards, Adeel

    Do rate the reply, if it helps or even if it doesnot, because it helps the members to know, what solved the issue. Thanks.

    R 1 Reply Last reply
    0
    • A Adeel Chaudhry

      Hello! I am reading data from sql server in a string. but no matter how kuch the data is in the sql server, i am only getting 4000 characters. Is there some sort of limit involved in it? Tried playing with SqlConnection.PacketSize, but invained! Regards, Adeel

      Do rate the reply, if it helps or even if it doesnot, because it helps the members to know, what solved the issue. Thanks.

      R Offline
      R Offline
      ReactiveX
      wrote on last edited by
      #2

      Yes, the default varchar size is 4000. Use the varchar(MAX) function to retrieve anything larger.

      Daniel Minnaar Lead Software Developer

      C 1 Reply Last reply
      0
      • R ReactiveX

        Yes, the default varchar size is 4000. Use the varchar(MAX) function to retrieve anything larger.

        Daniel Minnaar Lead Software Developer

        C Offline
        C Offline
        CKnig
        wrote on last edited by
        #3

        or use the "text" - type ( make sure to read about the limitations / gains - but I guess if the text is more than 4000 characters this type is the way to go - you don't want an index on this field right ? )

        A 1 Reply Last reply
        0
        • C CKnig

          or use the "text" - type ( make sure to read about the limitations / gains - but I guess if the text is more than 4000 characters this type is the way to go - you don't want an index on this field right ? )

          A Offline
          A Offline
          Adeel Chaudhry
          wrote on last edited by
          #4

          Hello! Is there any way to work with i.e. read and write data more than 8000 characters? Regards, Adeel

          Do rate the reply, if it helps or even if it doesnot, because it helps the members to know, what solved the issue. Thanks.

          C 1 Reply Last reply
          0
          • A Adeel Chaudhry

            Hello! Is there any way to work with i.e. read and write data more than 8000 characters? Regards, Adeel

            Do rate the reply, if it helps or even if it doesnot, because it helps the members to know, what solved the issue. Thanks.

            C Offline
            C Offline
            CKnig
            wrote on last edited by
            #5

            yes this is exactly what the text type is for (if you are using unicode take the ntext)

            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