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. Web Development
  3. ASP.NET
  4. SQL command parameters size

SQL command parameters size

Scheduled Pinned Locked Moved ASP.NET
database
3 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.
  • S Offline
    S Offline
    samerh
    wrote on last edited by
    #1

    Hi all i need to know exactly the size of sql parameters when definning them. Ex: SqlParameter foo = new SqlParameter(parameterName, dbType, size); this.Add(foo); I need to know size that should be send for each datatype, Ex: Bigint, float, varchar(max)... Thanks

    R 1 Reply Last reply
    0
    • S samerh

      Hi all i need to know exactly the size of sql parameters when definning them. Ex: SqlParameter foo = new SqlParameter(parameterName, dbType, size); this.Add(foo); I need to know size that should be send for each datatype, Ex: Bigint, float, varchar(max)... Thanks

      R Offline
      R Offline
      Ravikumar Commuri
      wrote on last edited by
      #2

      Hi you can give the max size as per ur requirement. But you have to follow while declaring the size of the parameter is not less than than the size of the parameter that u have declared in your stored proc's

      S 1 Reply Last reply
      0
      • R Ravikumar Commuri

        Hi you can give the max size as per ur requirement. But you have to follow while declaring the size of the parameter is not less than than the size of the parameter that u have declared in your stored proc's

        S Offline
        S Offline
        samerh
        wrote on last edited by
        #3

        Thanks for ur reply This is what iam doing right now decaring the size the same as i declare them in stored procedures. But for some types there is a default or max size we should commit to. Is there a list where i can get these defaults? Thanks

        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