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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Using databases in vc++

Using databases in vc++

Scheduled Pinned Locked Moved C / C++ / MFC
c++questiondatabasehelptutorial
18 Posts 4 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 smartymanav

    hi i am making a appliocation which facialates the procedure of student admission in a college... i hav made a database name "Students" which has 3 tables "student","fees","course" the objective of each table is clear by its name i suppose... now i have made a odbc object to link the databse in my mfc project... i want to know that how i use the data of all the 3 tables at the same time... ie i have designed 3 forms in the same project for each of the 3 tables...now i want to link the tables with the forms...how to do so???please help.... i wud b thankful...this is my first question...so please sorry for making it a long one!!!! thanks manav

    T Offline
    T Offline
    ThatsAlok
    wrote on last edited by
    #2

    have a look at this section :- http://www.codeproject.com/database/[^]

    "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

    cheers, Alok Gupta

    S 1 Reply Last reply
    0
    • T ThatsAlok

      have a look at this section :- http://www.codeproject.com/database/[^]

      "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

      cheers, Alok Gupta

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

      thanks a lot but i am unable to find any info regar4ding how to use multiple tables in my application...please help....

      T 1 Reply Last reply
      0
      • S smartymanav

        thanks a lot but i am unable to find any info regar4ding how to use multiple tables in my application...please help....

        T Offline
        T Offline
        ThatsAlok
        wrote on last edited by
        #4

        smartymanav wrote: but i am unable to find any info regar4ding how to use multiple tables in my application Have a Try on this Mr. Manav, http://www.codeproject.com/database/caaadoclass1.asp[^] I Believe it's yours personel project at MNR

        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

        cheers, Alok Gupta

        S 1 Reply Last reply
        0
        • T ThatsAlok

          smartymanav wrote: but i am unable to find any info regar4ding how to use multiple tables in my application Have a Try on this Mr. Manav, http://www.codeproject.com/database/caaadoclass1.asp[^] I Believe it's yours personel project at MNR

          "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

          cheers, Alok Gupta

          S Offline
          S Offline
          smartymanav
          wrote on last edited by
          #5

          thanks again but i am using odbc... no its not my personal project in my college...i am doing training in stpi and they hav given me this project to design for a college(private)..they have said that if they lie it they will recomend it to the private colege... please help... i just want to know how to use multiple tables....i know to make use of the database which only has a single table in vc++ using odbc... thanking u

          T 1 Reply Last reply
          0
          • S smartymanav

            thanks again but i am using odbc... no its not my personal project in my college...i am doing training in stpi and they hav given me this project to design for a college(private)..they have said that if they lie it they will recomend it to the private colege... please help... i just want to know how to use multiple tables....i know to make use of the database which only has a single table in vc++ using odbc... thanking u

            T Offline
            T Offline
            ThatsAlok
            wrote on last edited by
            #6

            Then Use this:- http://www.codeproject.com/database/caaodbcclass.asp[^] Buddy,Take my advice:- learn Goggling, otherwise it very difficult to survive in Software Field :(. smartymanav wrote: ...i am doing training in stpi STPI : Stands for Software Technology Park or India. AFAIK, there are more than 10 STPI in India. In which one are you working!

            "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

            cheers, Alok Gupta

            S 1 Reply Last reply
            0
            • T ThatsAlok

              Then Use this:- http://www.codeproject.com/database/caaodbcclass.asp[^] Buddy,Take my advice:- learn Goggling, otherwise it very difficult to survive in Software Field :(. smartymanav wrote: ...i am doing training in stpi STPI : Stands for Software Technology Park or India. AFAIK, there are more than 10 STPI in India. In which one are you working!

              "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

              cheers, Alok Gupta

              S Offline
              S Offline
              smartymanav
              wrote on last edited by
              #7

              i am in noida branch of stpi.... ya i have reached this site by googling only!!!

              T 1 Reply Last reply
              0
              • S smartymanav

                hi i am making a appliocation which facialates the procedure of student admission in a college... i hav made a database name "Students" which has 3 tables "student","fees","course" the objective of each table is clear by its name i suppose... now i have made a odbc object to link the databse in my mfc project... i want to know that how i use the data of all the 3 tables at the same time... ie i have designed 3 forms in the same project for each of the 3 tables...now i want to link the tables with the forms...how to do so???please help.... i wud b thankful...this is my first question...so please sorry for making it a long one!!!! thanks manav

                M Offline
                M Offline
                Michael P Butler
                wrote on last edited by
                #8

                Your post is a little confused. Do you want to populate each form with data from the matching database table or do you want to select data from multiple tables and display in one form? Which Database classes are you using? CDatabase? ADO? I recommend you use ADO, which you can use your ODBC connection with. Have a look at these classes[^], as they'll make it easier. Michael CP Blog [^] Development Blog [^]

                S 1 Reply Last reply
                0
                • M Michael P Butler

                  Your post is a little confused. Do you want to populate each form with data from the matching database table or do you want to select data from multiple tables and display in one form? Which Database classes are you using? CDatabase? ADO? I recommend you use ADO, which you can use your ODBC connection with. Have a look at these classes[^], as they'll make it easier. Michael CP Blog [^] Development Blog [^]

                  S Offline
                  S Offline
                  smartymanav
                  wrote on last edited by
                  #9

                  thanks a lot Micheal i am usinf Cdatabase ya i want to actually carry out both these jobs....i have 3 forms one each for the 3 tables...for eg student form for student table...but student form will have link to the course form and will be linked by courseid....u r getting it na.... and similarly fees table will b linked to student by regno field... and i am not able to populate data in the usual way i do it for one table... consider the foll: RFX_Text(pFX, _T("[Student].[FatherName]"), m_FatherName); this is the for linking m_FatherName varaible with the FatherName field in student table... is this correct??? please help thanks

                  1 Reply Last reply
                  0
                  • S smartymanav

                    i am in noida branch of stpi.... ya i have reached this site by googling only!!!

                    T Offline
                    T Offline
                    ThatsAlok
                    wrote on last edited by
                    #10

                    smartymanav wrote: i am in noida branch of stpi.... There are three Stpi in Noida, One in Sec 29 Ganga Shopping Complex, Second Logix Park Sector 16 and Last One Electronic City Sec 62-63. In which One are you working :)

                    "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                    cheers, Alok Gupta

                    S 1 Reply Last reply
                    0
                    • S smartymanav

                      hi i am making a appliocation which facialates the procedure of student admission in a college... i hav made a database name "Students" which has 3 tables "student","fees","course" the objective of each table is clear by its name i suppose... now i have made a odbc object to link the databse in my mfc project... i want to know that how i use the data of all the 3 tables at the same time... ie i have designed 3 forms in the same project for each of the 3 tables...now i want to link the tables with the forms...how to do so???please help.... i wud b thankful...this is my first question...so please sorry for making it a long one!!!! thanks manav

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

                      smartymanav wrote: i want to know that how i use the data of all the 3 tables at the same time... Search MSDN for examples of INNER JOIN.


                      "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

                      1 Reply Last reply
                      0
                      • T ThatsAlok

                        smartymanav wrote: i am in noida branch of stpi.... There are three Stpi in Noida, One in Sec 29 Ganga Shopping Complex, Second Logix Park Sector 16 and Last One Electronic City Sec 62-63. In which One are you working :)

                        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                        cheers, Alok Gupta

                        S Offline
                        S Offline
                        smartymanav
                        wrote on last edited by
                        #12

                        hey u know a lot!!! i am in ganga shopping complex sec 29.....

                        T 1 Reply Last reply
                        0
                        • S smartymanav

                          hey u know a lot!!! i am in ganga shopping complex sec 29.....

                          T Offline
                          T Offline
                          ThatsAlok
                          wrote on last edited by
                          #13

                          smartymanav wrote: am in ganga shopping complex sec 29..... So u are in birlaSoft :)

                          "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                          cheers, Alok Gupta

                          S 2 Replies Last reply
                          0
                          • T ThatsAlok

                            smartymanav wrote: am in ganga shopping complex sec 29..... So u are in birlaSoft :)

                            "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                            cheers, Alok Gupta

                            S Offline
                            S Offline
                            smartymanav
                            wrote on last edited by
                            #14

                            do u live nearby!!!! no actually birla soft is also here... i am in stpi only....they have a training division....they give out projects there byeee

                            1 Reply Last reply
                            0
                            • T ThatsAlok

                              smartymanav wrote: am in ganga shopping complex sec 29..... So u are in birlaSoft :)

                              "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                              cheers, Alok Gupta

                              S Offline
                              S Offline
                              smartymanav
                              wrote on last edited by
                              #15

                              hey do u live near by!!!! ya u r rite...birla soft is also here but i am in stpi only they have a training division and they give out projects here byeeee

                              T 1 Reply Last reply
                              0
                              • S smartymanav

                                hey do u live near by!!!! ya u r rite...birla soft is also here but i am in stpi only they have a training division and they give out projects here byeeee

                                T Offline
                                T Offline
                                ThatsAlok
                                wrote on last edited by
                                #16

                                smartymanav wrote: hey do u live near by!!!! Nope Work NearBY :) smartymanav wrote: they have a training division and they give out projects here Ok nice

                                "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                                cheers, Alok Gupta

                                S 1 Reply Last reply
                                0
                                • T ThatsAlok

                                  smartymanav wrote: hey do u live near by!!!! Nope Work NearBY :) smartymanav wrote: they have a training division and they give out projects here Ok nice

                                  "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                                  cheers, Alok Gupta

                                  S Offline
                                  S Offline
                                  smartymanav
                                  wrote on last edited by
                                  #17

                                  where????

                                  T 1 Reply Last reply
                                  0
                                  • S smartymanav

                                    where????

                                    T Offline
                                    T Offline
                                    ThatsAlok
                                    wrote on last edited by
                                    #18

                                    smartymanav wrote: where???? Thats Secret :)

                                    "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                                    cheers, Alok Gupta

                                    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