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. ODBC programming - need help

ODBC programming - need help

Scheduled Pinned Locked Moved C / C++ / MFC
databasehelpquestionc++com
3 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.
  • A Offline
    A Offline
    acroitoriu
    wrote on last edited by
    #1

    I just started programming VC++6 with database support and I already have a major problem: I created a SDI application and when I choose only one table from the Access database everything goes well. But I can't handle 2 or more table from the same database.... How do I use 2 or more table and how do I execute queries(SQL) on tables??? :confused: I really need help as soon as possible... A small application using a database with 2 or more table and which shows how to execute SQL queries on different tables would be great... I would really appreciate that! Please help me... :-O Croitoriu Andrei croi2001@yahoo.com

    H D 2 Replies Last reply
    0
    • A acroitoriu

      I just started programming VC++6 with database support and I already have a major problem: I created a SDI application and when I choose only one table from the Access database everything goes well. But I can't handle 2 or more table from the same database.... How do I use 2 or more table and how do I execute queries(SQL) on tables??? :confused: I really need help as soon as possible... A small application using a database with 2 or more table and which shows how to execute SQL queries on different tables would be great... I would really appreciate that! Please help me... :-O Croitoriu Andrei croi2001@yahoo.com

      H Offline
      H Offline
      Hardy_Smith
      wrote on last edited by
      #2

      I would recommand you to use a real database server, Firebird for example. www.ibphoenix.com Do you want to program odbc lowlevel? If not, take a look at the database-Classes here in codeproject. http://www.codeproject.com/database/#ODBC[^] There are some examples. Hardy.

      1 Reply Last reply
      0
      • A acroitoriu

        I just started programming VC++6 with database support and I already have a major problem: I created a SDI application and when I choose only one table from the Access database everything goes well. But I can't handle 2 or more table from the same database.... How do I use 2 or more table and how do I execute queries(SQL) on tables??? :confused: I really need help as soon as possible... A small application using a database with 2 or more table and which shows how to execute SQL queries on different tables would be great... I would really appreciate that! Please help me... :-O Croitoriu Andrei croi2001@yahoo.com

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

        The SQL query generated by ClassWizard should have formed the JOIN clause automatically. In case it didn't, you'll need to do it manually. For example, here is a JOIN on three tables of a database I recently worked on:

        SELECT [Meet].[Name], [Meet].[Date], [Gymnast].[Name], [Scores].[Score1]
        FROM Meet INNER JOIN (Gymnast INNER JOIN Scores ON [Gymnast].[AutoNumber]=[Scores].[GymnastNum]) ON [Meet].[AutoNumber]=[Scores].[MeetNum]
        ORDER BY meet.date;

        Search MSDN for different examples of LEFT, RIGHT, INNER, FULL, CROSS, and OUTER joins.


        "When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen

        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