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. Length of a column of an SQL Table

Length of a column of an SQL Table

Scheduled Pinned Locked Moved C#
csharpdatabasedesignhelpquestion
4 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.
  • S Offline
    S Offline
    Sebastian T Xavier
    wrote on last edited by
    #1

    Hello... How can I get the Length of a column of an sql table from my C# code.... In my application I am using databound controls. I want to know the length of the field in UI. any help would be appreciated... Thanks

    Sebastian

    A P 2 Replies Last reply
    0
    • S Sebastian T Xavier

      Hello... How can I get the Length of a column of an sql table from my C# code.... In my application I am using databound controls. I want to know the length of the field in UI. any help would be appreciated... Thanks

      Sebastian

      A Offline
      A Offline
      Adam R Harris
      wrote on last edited by
      #2

      Query the schema of the table. http://www.mayvelous.com/2008/02/13/listing-tables-and-columns-in-sql-2005-using-information-schema/[^] The info in this article is specific to sql 2005, but it should still apply to other versions.

      If at first you don't succeed ... post it on The Code Project and Pray.

      1 Reply Last reply
      0
      • S Sebastian T Xavier

        Hello... How can I get the Length of a column of an sql table from my C# code.... In my application I am using databound controls. I want to know the length of the field in UI. any help would be appreciated... Thanks

        Sebastian

        P Offline
        P Offline
        PIEBALDconsult
        wrote on last edited by
        #3

        See this[^] recent thread.

        S 1 Reply Last reply
        0
        • P PIEBALDconsult

          See this[^] recent thread.

          S Offline
          S Offline
          Sebastian T Xavier
          wrote on last edited by
          #4

          Thanks a lot

          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