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. Question of DB programming

Question of DB programming

Scheduled Pinned Locked Moved C / C++ / MFC
databasehelpquestionc++sql-server
3 Posts 2 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
    Andy Hunter
    wrote on last edited by
    #1

    Hello, I was hoping someone could point me in the right direction with my problem. I have been developing in Access for quite some time now and I am increasingly finding the limitations on form design frustrating, so I have decided to go with good old C++ programming. However I have no desire to create a DB engine when MS Access does such a nice job. I was wondering if someone could provide suggestions on references I could obtain to allow me to develop my interface and logic in C yet still use Access/SQL server as the backend database? Any help will be greatly appreciated.

    S 1 Reply Last reply
    0
    • A Andy Hunter

      Hello, I was hoping someone could point me in the right direction with my problem. I have been developing in Access for quite some time now and I am increasingly finding the limitations on form design frustrating, so I have decided to go with good old C++ programming. However I have no desire to create a DB engine when MS Access does such a nice job. I was wondering if someone could provide suggestions on references I could obtain to allow me to develop my interface and logic in C yet still use Access/SQL server as the backend database? Any help will be greatly appreciated.

      S Offline
      S Offline
      Steve S
      wrote on last edited by
      #2

      Yup. You can use a variety of APIs to do this; ODBC, DAO, ADO or OLE DB, for example. For Access only, DAO used to be the choice. However, my personal favourite is OLE DB. This (like ODBC and ADO) is driver or provider based, and allows you to write code that works against any database. That's the theory, but not always the practice, since there are driver/provider specific bits that make it more difficult. I use the ATLDBCLI.H header (supplied with VC6 and later) which allows you to manipulate recordsets based on pre-defined SQL and known columns, as well as on dynamic (user-defined) data. To make the most of this, you should start with something like the SAMS "Database Programming with Visual C++ 6 in 21 days" book, but don't expect it to take only 21 days! What you will miss in straight C++ is data-aware controls, and the reporting, unless you use something like Crystal Reports. I keep meaning to write a CP article on C++ report generation, but never seem to have the time :sigh: For grid stuff you can use the excellent Grid control from Chris right here on CP. Steve S Developer for hire

      A 1 Reply Last reply
      0
      • S Steve S

        Yup. You can use a variety of APIs to do this; ODBC, DAO, ADO or OLE DB, for example. For Access only, DAO used to be the choice. However, my personal favourite is OLE DB. This (like ODBC and ADO) is driver or provider based, and allows you to write code that works against any database. That's the theory, but not always the practice, since there are driver/provider specific bits that make it more difficult. I use the ATLDBCLI.H header (supplied with VC6 and later) which allows you to manipulate recordsets based on pre-defined SQL and known columns, as well as on dynamic (user-defined) data. To make the most of this, you should start with something like the SAMS "Database Programming with Visual C++ 6 in 21 days" book, but don't expect it to take only 21 days! What you will miss in straight C++ is data-aware controls, and the reporting, unless you use something like Crystal Reports. I keep meaning to write a CP article on C++ report generation, but never seem to have the time :sigh: For grid stuff you can use the excellent Grid control from Chris right here on CP. Steve S Developer for hire

        A Offline
        A Offline
        Andy Hunter
        wrote on last edited by
        #3

        Thankyou for the advice. Is there other references that you know of besides the SAMS 21 Day book? I am usually not a big fan of those books; I usually find them lacking with respect to in depth coverage of the subject. I will look into the book though, just wondering if you knew of any others.

        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