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. How to get all column name in database using CDatabase?

How to get all column name in database using CDatabase?

Scheduled Pinned Locked Moved Database
databasequestionhelptutorial
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.
  • L Offline
    L Offline
    Le rner
    wrote on last edited by
    #1

    hi all, i am using CDatabase to open the database and its function ExecuteSQL to execute the query. here how can i get all column name list of current database. please help me for this. thanks in advance.

    B M 2 Replies Last reply
    0
    • L Le rner

      hi all, i am using CDatabase to open the database and its function ExecuteSQL to execute the query. here how can i get all column name list of current database. please help me for this. thanks in advance.

      B Offline
      B Offline
      Blue_Boy
      wrote on last edited by
      #2

      Le@rner wrote:

      get all column name list of current database.

      Did you mean get all column name list of current table.


      I Love T-SQL "VB.NET is developed with C#.NET" If my post helps you kindly save my time by voting my post.

      L 1 Reply Last reply
      0
      • L Le rner

        hi all, i am using CDatabase to open the database and its function ExecuteSQL to execute the query. here how can i get all column name list of current database. please help me for this. thanks in advance.

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

        Hmm CDatabase looks like a wrapper class around a connection - a C++ one at that! It will depend on your database and your permissions but in sql server there are the system information views and the sysobjects table. These will supply all the system information you need. This may be useful System view mapping[^]

        Never underestimate the power of human stupidity RAH

        1 Reply Last reply
        0
        • B Blue_Boy

          Le@rner wrote:

          get all column name list of current database.

          Did you mean get all column name list of current table.


          I Love T-SQL "VB.NET is developed with C#.NET" If my post helps you kindly save my time by voting my post.

          L Offline
          L Offline
          Le rner
          wrote on last edited by
          #4

          Blue_Boy wrote:

          Did you mean get all column name list of current table.

          yes

          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