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 / C++ / MFC
  4. how to create a table in the database using mfc

how to create a table in the database using mfc

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialc++databasehelp
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.
  • V Offline
    V Offline
    vc _fragrance
    wrote on last edited by
    #1

    In my application I have created a propertypage.In that property page I have displayed three edit boxes. For example in that edit boxes the user will enter name,sex,age. Taking those three values as column names I have to create a table in the database. while creating my project I have chosen Database view with file support. I used ODBC to connect to a datasource. Can u plz help me. Thanks in advance.

    S D V 4 Replies Last reply
    0
    • V vc _fragrance

      In my application I have created a propertypage.In that property page I have displayed three edit boxes. For example in that edit boxes the user will enter name,sex,age. Taking those three values as column names I have to create a table in the database. while creating my project I have chosen Database view with file support. I used ODBC to connect to a datasource. Can u plz help me. Thanks in advance.

      S Offline
      S Offline
      Sarath C
      wrote on last edited by
      #2

      Hi, it seems you have posted the question quite back sometime. ok. you can use CRecordSet like classes to create tables. before that you may need to connect to the data base using CDatabase class. you can see some samples in MSDN itself. IMHO, It's better not to attach the database with some controls. because on every change it will update the database. it will slowup the entire application if your application has enough size and others are accessing the database. you can take the values at the time of update. that would be better. This is not a solution for your problem but I was trying to explain a good practice.

      -Sarath. The more you can dream the more you can do - Michael Korda"

      My blog - Sharing My Thoughts, An Article - Understanding Statepattern

      1 Reply Last reply
      0
      • V vc _fragrance

        In my application I have created a propertypage.In that property page I have displayed three edit boxes. For example in that edit boxes the user will enter name,sex,age. Taking those three values as column names I have to create a table in the database. while creating my project I have chosen Database view with file support. I used ODBC to connect to a datasource. Can u plz help me. Thanks in advance.

        S Offline
        S Offline
        Sarath C
        wrote on last edited by
        #3

        Sometimes this [^]would help you

        -Sarath. The more you can dream the more you can do - Michael Korda"

        My blog - Sharing My Thoughts, An Article - Understanding Statepattern

        1 Reply Last reply
        0
        • V vc _fragrance

          In my application I have created a propertypage.In that property page I have displayed three edit boxes. For example in that edit boxes the user will enter name,sex,age. Taking those three values as column names I have to create a table in the database. while creating my project I have chosen Database view with file support. I used ODBC to connect to a datasource. Can u plz help me. Thanks in advance.

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          No need to repost. See here.


          "Money talks. When my money starts to talk, I get a bill to shut it up." - Frank

          "Judge not by the eye but by the heart." - Native American Proverb

          1 Reply Last reply
          0
          • V vc _fragrance

            In my application I have created a propertypage.In that property page I have displayed three edit boxes. For example in that edit boxes the user will enter name,sex,age. Taking those three values as column names I have to create a table in the database. while creating my project I have chosen Database view with file support. I used ODBC to connect to a datasource. Can u plz help me. Thanks in advance.

            V Offline
            V Offline
            vc _fragrance
            wrote on last edited by
            #5

            Thank you very much for all of you

            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