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. CRecordset Alternatives

CRecordset Alternatives

Scheduled Pinned Locked Moved C / C++ / MFC
questioncsharpc++databasevisual-studio
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.
  • S Offline
    S Offline
    slacker
    wrote on last edited by
    #1

    I recently switched from VS6 to VS.Net for writing unmanaged C++. I noticed they took away the Wizard to derive a class from a CRecordset and wrap it around a table. I only know how to access database using CDatabase and CRecordset (or a class derived from them). I am guessing that the idea is to get away from ODBC and to start using OLE or ADO. I found an article in a book describing a set of classes CADOConnection and CADORecordset. I cannot find neither of them mentioned on MSDN, so my first questions is does anyone heard of and used these classes and if so is there any documention on them. My Next question is what alternatives does anyone else like to use instead of CRecordset? I know that OLE is faster than ADO, but is that much faster and is ADO that much easier to use? One last question, for anyway using generic CRecordsets, what is the easiest way to tell if a field is null, I know i can do it from a class that is derived and has teh DDX calls, but what about just a CRecordset? JD

    P S 2 Replies Last reply
    0
    • S slacker

      I recently switched from VS6 to VS.Net for writing unmanaged C++. I noticed they took away the Wizard to derive a class from a CRecordset and wrap it around a table. I only know how to access database using CDatabase and CRecordset (or a class derived from them). I am guessing that the idea is to get away from ODBC and to start using OLE or ADO. I found an article in a book describing a set of classes CADOConnection and CADORecordset. I cannot find neither of them mentioned on MSDN, so my first questions is does anyone heard of and used these classes and if so is there any documention on them. My Next question is what alternatives does anyone else like to use instead of CRecordset? I know that OLE is faster than ADO, but is that much faster and is ADO that much easier to use? One last question, for anyway using generic CRecordsets, what is the easiest way to tell if a field is null, I know i can do it from a class that is derived and has teh DDX calls, but what about just a CRecordset? JD

      P Offline
      P Offline
      Pyt
      wrote on last edited by
      #2

      Hi, I personaly use ADO objects. Have a look at the article "ADO at a glance" for an introduction to ADO. Pyt

      S 1 Reply Last reply
      0
      • P Pyt

        Hi, I personaly use ADO objects. Have a look at the article "ADO at a glance" for an introduction to ADO. Pyt

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

        What unmanaged VC++ ADO objects are there, and what is there header file? JD

        1 Reply Last reply
        0
        • S slacker

          I recently switched from VS6 to VS.Net for writing unmanaged C++. I noticed they took away the Wizard to derive a class from a CRecordset and wrap it around a table. I only know how to access database using CDatabase and CRecordset (or a class derived from them). I am guessing that the idea is to get away from ODBC and to start using OLE or ADO. I found an article in a book describing a set of classes CADOConnection and CADORecordset. I cannot find neither of them mentioned on MSDN, so my first questions is does anyone heard of and used these classes and if so is there any documention on them. My Next question is what alternatives does anyone else like to use instead of CRecordset? I know that OLE is faster than ADO, but is that much faster and is ADO that much easier to use? One last question, for anyway using generic CRecordsets, what is the easiest way to tell if a field is null, I know i can do it from a class that is derived and has teh DDX calls, but what about just a CRecordset? JD

          S Offline
          S Offline
          Stefan Pedersen
          wrote on last edited by
          #4

          I have done my fair share of DB programming during the last years and all I have to say is... Stay away from ADO, it contains so many gotchas that it's plain silly. Also it really lacks the performance needed for heavy multi-user system. My recomendation would be OLEDB by using the ATL supportclasses (CCommand, CRowset and so on). Use the wizard to get the hang of things then write your own code by hand since the wizard (IMHO) is a bit to stupid to be used in production code. If you still REALLY want to use ADO get the MS Press book, Programming ADO (it's good), and read it cover-cover atleast 2 times then check out OLEDB again :)

          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