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. Database & SysAdmin
  3. Database
  4. DB Conversion Advice

DB Conversion Advice

Scheduled Pinned Locked Moved Database
databasec++question
11 Posts 5 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.
  • K Kyudos

    Our database access code is DAO which has worked admirably for many years, making full use of the MFC DAO classes (CDaoRecordset, CDaoDatabase, CDaoFieldExchange etc.) to access mdb files. Now we need a 64-bit build and support for .accdb, does anyone have any advice on the quickest and easiest way to convert all my code? (to ADO? or something else?)

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

    If you have a proper Data Access Layer it should be as simple as replacing it.

    1 Reply Last reply
    0
    • K Kyudos

      Our database access code is DAO which has worked admirably for many years, making full use of the MFC DAO classes (CDaoRecordset, CDaoDatabase, CDaoFieldExchange etc.) to access mdb files. Now we need a 64-bit build and support for .accdb, does anyone have any advice on the quickest and easiest way to convert all my code? (to ADO? or something else?)

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #3

      Surely you have just one class that does all your database access! If not you now know the reason why it is so important.

      Never underestimate the power of human stupidity RAH

      K 1 Reply Last reply
      0
      • M Mycroft Holmes

        Surely you have just one class that does all your database access! If not you now know the reason why it is so important.

        Never underestimate the power of human stupidity RAH

        K Offline
        K Offline
        Kyudos
        wrote on last edited by
        #4

        You guys are so funny! ;P It's as if my code wasn't more than a decade old or something, and had been updated as technology progressed... :^) I have a single DLL of database access code comprising several classes derived from CDAORecordset and a database class containing a CDaoDatabase pointer. I think most of it will translate to CDatabase and CRecordset fairly directly.

        M 2 Replies Last reply
        0
        • K Kyudos

          You guys are so funny! ;P It's as if my code wasn't more than a decade old or something, and had been updated as technology progressed... :^) I have a single DLL of database access code comprising several classes derived from CDAORecordset and a database class containing a CDaoDatabase pointer. I think most of it will translate to CDatabase and CRecordset fairly directly.

          M Offline
          M Offline
          Mycroft Holmes
          wrote on last edited by
          #5

          Yah sarcasm sucks sometimes but you have seen the quality of some questions... I have never heard of a tool to convert a custom DLL to a different data transport layer. It should be a trivial matter to rewrite the DLL, ours has about 6 methods for accessing the database. It does sound like you are using your DLL for a lot more than just accessing the database, traversing and manipulating datasets I suspect.

          Never underestimate the power of human stupidity RAH

          1 Reply Last reply
          0
          • K Kyudos

            You guys are so funny! ;P It's as if my code wasn't more than a decade old or something, and had been updated as technology progressed... :^) I have a single DLL of database access code comprising several classes derived from CDAORecordset and a database class containing a CDaoDatabase pointer. I think most of it will translate to CDatabase and CRecordset fairly directly.

            M Offline
            M Offline
            Mycroft Holmes
            wrote on last edited by
            #6

            Ahh, I am so used to using collections I have forgotten what it is like to access the database directly. I would suggest you may want to take a look at your architecture, I presume you are using winforms and binding the datasets to the controls which is going to entail a lot of work to change.

            Never underestimate the power of human stupidity RAH

            K 1 Reply Last reply
            0
            • M Mycroft Holmes

              Ahh, I am so used to using collections I have forgotten what it is like to access the database directly. I would suggest you may want to take a look at your architecture, I presume you are using winforms and binding the datasets to the controls which is going to entail a lot of work to change.

              Never underestimate the power of human stupidity RAH

              K Offline
              K Offline
              Kyudos
              wrote on last edited by
              #7

              Mycroft, Mycroft, Mycroft.... do I have to tell you about assumptions? :-D Winforms? Binding? We don't hold with that new-fangled nonsense around these parts! C++, MFC and FORTRAN is what Real Men™ use! (Seriously though if anybody ever 'looked at our architecture' I probably wouldn't be facing this problem! Real Men™ don't have time (or budget!) to update code that works unless they are forced to)

              M 1 Reply Last reply
              0
              • K Kyudos

                Mycroft, Mycroft, Mycroft.... do I have to tell you about assumptions? :-D Winforms? Binding? We don't hold with that new-fangled nonsense around these parts! C++, MFC and FORTRAN is what Real Men™ use! (Seriously though if anybody ever 'looked at our architecture' I probably wouldn't be facing this problem! Real Men™ don't have time (or budget!) to update code that works unless they are forced to)

                M Offline
                M Offline
                Mycroft Holmes
                wrote on last edited by
                #8

                Kyudos wrote:

                on't have time (or budget!) to update code that works

                And then someone upgrades the OS, AAaaaahhhhhh. We have about 18, relatively small, Silverlight apps in production representing some decades in man hours of work. Re building them into MVC before 2020 is going to be a nightmare.

                Never underestimate the power of human stupidity RAH

                1 Reply Last reply
                0
                • K Kyudos

                  Our database access code is DAO which has worked admirably for many years, making full use of the MFC DAO classes (CDaoRecordset, CDaoDatabase, CDaoFieldExchange etc.) to access mdb files. Now we need a 64-bit build and support for .accdb, does anyone have any advice on the quickest and easiest way to convert all my code? (to ADO? or something else?)

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #9

                  Kyudos wrote:

                  Now we need a 64-bit build and support for .accdb

                  Are you aware that the Access Database Provider can't be run in a 64bit Process? Thanks go to Microsoft. (edit: see response from Jörgen)

                  J 1 Reply Last reply
                  0
                  • L Lost User

                    Kyudos wrote:

                    Now we need a 64-bit build and support for .accdb

                    Are you aware that the Access Database Provider can't be run in a 64bit Process? Thanks go to Microsoft. (edit: see response from Jörgen)

                    J Offline
                    J Offline
                    Jorgen Andersson
                    wrote on last edited by
                    #10

                    AccessDatabaseEngine_x64.exe is available for downloading here[^]. I would think twice before installing it together with a 32-bit office installation though.

                    Wrong is evil and must be defeated. - Jeff Ello

                    L 1 Reply Last reply
                    0
                    • J Jorgen Andersson

                      AccessDatabaseEngine_x64.exe is available for downloading here[^]. I would think twice before installing it together with a 32-bit office installation though.

                      Wrong is evil and must be defeated. - Jeff Ello

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #11

                      Oh wow, didn't hear about that. Thanks for sharing!

                      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