DAO vs ADO

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alan Welsford

    #1

    DAO vs ADO

    ADO Code 66 Seconds

    Set dcndb = New ADODB.Connectio n
    dcndb.Provider = "Microsoft.Jet. OLEDB.4.0"
    dcndb.Connectio nString = "Data Source=" + dtbs$
    dcndb.Open
    Set rsUsers = New ADODB.Recordset
    rsUsers.Open Sql$, dcndb, adOpenForwardOn ly, adLockReadOnly

    DAO Code 20 Seconds

    Set rDb = DBEngine.Worksp aces(0).OpenDat abase(dtbs$)
    Set rsUsers = rDb.OpenRecords et(Sql$)



    *** Sent via Developersdex http://www.developersdex.com ***
  • =?Utf-8?B?TWljaGVsIFBvc3NldGggW01DUF0=?=

    #2
    RE: DAO vs ADO

    DAO is specially optimized for ACCESS ( Native )

    ADO is just a uniform way of acessing datasources through a provider
    so they can`t be compared in this way

    And for .Net they are both Obsolete so irrelevant ( DAO was / is even
    obsolete for VB6 )

    As we are here in microsoft.publi c.dotnet , we do it now the recomended way
    import all data to a SQL 2005 MDF with SMS , now create T-SQL query`s , and
    now analyze this query in the database engine tuning advisor , apply al
    recomendations , now run this query from your VB.Net application ( with the
    sql native client provider )

    what do you see now ?

    You wil probably see that the access database performance is blown away and
    we ar not even at max , cause we could also create SP`s , indexed views ,
    create functions etc etc to do some final tuning , however this requires
    skills that most VB proggers do not posess

    regards

    Michel




    "Alan Welsford" wrote:
    ADO Code 66 Seconds
    >
    Set dcndb = New ADODB.Connectio n
    dcndb.Provider = "Microsoft.Jet. OLEDB.4.0"
    dcndb.Connectio nString = "Data Source=" + dtbs$
    dcndb.Open
    Set rsUsers = New ADODB.Recordset
    rsUsers.Open Sql$, dcndb, adOpenForwardOn ly, adLockReadOnly
    >
    DAO Code 20 Seconds
    >
    Set rDb = DBEngine.Worksp aces(0).OpenDat abase(dtbs$)
    Set rsUsers = rDb.OpenRecords et(Sql$)
    >
    >
    >
    *** Sent via Developersdex http://www.developersdex.com ***
    >

    Comment

    • Harry Strybos

      #3
      Re: DAO vs ADO

      "Alan Welsford" <men1720@kingsl ey.co.zawrote in message
      news:u82HNxwLHH A.3668@TK2MSFTN GP02.phx.gbl...
      ADO Code 66 Seconds
      >
      Set dcndb = New ADODB.Connectio n
      dcndb.Provider = "Microsoft.Jet. OLEDB.4.0"
      dcndb.Connectio nString = "Data Source=" + dtbs$
      dcndb.Open
      Set rsUsers = New ADODB.Recordset
      rsUsers.Open Sql$, dcndb, adOpenForwardOn ly, adLockReadOnly
      >
      DAO Code 20 Seconds
      >
      Set rDb = DBEngine.Worksp aces(0).OpenDat abase(dtbs$)
      Set rsUsers = rDb.OpenRecords et(Sql$)
      >
      >
      >
      *** Sent via Developersdex http://www.developersdex.com ***
      Well, the 66 seconds for ADO does seem an inordinate time as does 20 seconds
      for DAO, however, the query may be designed to be resource intensive.

      DAO has always far outperformed ADO (ADO.Net appears to have bridged that
      gap to some extent). It should be noted that ADO does have a higher overhead
      given the added functionallity it exposes. Having said that, DAO does
      perform beautifully and still exposes enough methods to please most. Just to
      get a new identity value in DAO leaves ADO for dead.

      If you want to use Access as a back end, DAO is your man. This statement may
      be inappropriate given the following:

      1. Have not tested how DAO plays with Access 2007
      2. Given the massive changes MS have made to VB, DAO may not work at some
      later date. Our tests with Vista show DAO is still fine there.
      3. DAO can still exhibit some data instability, althought this seems to
      be a rare occurrence.

      Just by coincidence, I am currently finishing a VB6/DAO project for a
      friend. While I really love the power of VB.Net, the VB6/DAO combination is
      still really cool for a quick rollout.

      Cheers

      Harry



      Comment

      • rdrunner

        #4
        Re: DAO vs ADO

        "Michel Posseth [MCP]" <MichelPossethM CP@discussions. microsoft.comwr ote in
        message news:C54EEC4D-96CD-4973-9AEF-5197ECE5E29E@mi crosoft.com...
        wait !!! before i start a flame war :-)
        >
        when i reread the below line i thought it might be interpreted the wrong
        way
        >
        >however this requires
        >skills that most VB proggers do not posess
        >
        With this line i actually mean that not all VB ( or C# , J# etc etc )
        coders have enough knowledge of SQL server to perform these tasks . That`s
        why we have Dba`s .
        >
        regards
        I think every Programmer should be aware of what he does to a DB. I think
        this is a skill essential to developing "big" applications. I have seen
        VB/C#/... Code that made me "cry" several times already and i can attest
        that there are many out there who are not even "helped" by Moores law...

        Also... a querry that runs over 20 seconds is something i dont "like" Its to
        slow no matter what tecnology you are using ;)

        Comment

        • Cor Ligthert [MVP]

          #5
          Re: DAO vs ADO

          Michel,

          Do you mean that this will only work in China.
          To most proggers even the normallization rules are new chinese
          :-)

          Cor


          Comment

          • aaron.kempf@gmail.com

            #6
            Re: DAO vs ADO


            I disagree with your analysis of DAO vs ADO.

            for starters, MDB is a DEAD FORMAT, anyone that uses it anywhere should
            be fired and then spit upon.

            and try comparing that to an Access Data Project and ADO

            we don't have DBAs; you _ARE_ the DBA

            if you don't know enoug about SQL to build a database from scratch then
            you shouldn't be a programmer

            -Aaron

            Michel wrote:
            wait !!! before i start a flame war :-)
            >
            when i reread the below line i thought it might be interpreted the wrong way
            >
            however this requires
            skills that most VB proggers do not posess
            >
            With this line i actually mean that not all VB ( or C# , J# etc etc )
            coders have enough knowledge of SQL server to perform these tasks . That`s
            why we have Dba`s .
            >
            regards
            >
            Michel
            >
            >
            >
            >
            >
            >
            >
            "Michel Posseth [MCP]" wrote:
            >
            DAO is specially optimized for ACCESS ( Native )

            ADO is just a uniform way of acessing datasources through a provider
            so they can`t be compared in this way

            And for .Net they are both Obsolete so irrelevant ( DAO was / is even
            obsolete for VB6 )

            As we are here in microsoft.publi c.dotnet , we do it now the recomended way
            import all data to a SQL 2005 MDF with SMS , now create T-SQL query`s , and
            now analyze this query in the database engine tuning advisor , apply al
            recomendations , now run this query from your VB.Net application ( with the
            sql native client provider )

            what do you see now ?

            You wil probably see that the access database performance is blown away and
            we ar not even at max , cause we could also create SP`s , indexed views ,
            create functions etc etc to do some final tuning , however this requires
            skills that most VB proggers do not posess

            regards

            Michel




            "Alan Welsford" wrote:
            ADO Code 66 Seconds
            >
            Set dcndb = New ADODB.Connectio n
            dcndb.Provider = "Microsoft.Jet. OLEDB.4.0"
            dcndb.Connectio nString = "Data Source=" + dtbs$
            dcndb.Open
            Set rsUsers = New ADODB.Recordset
            rsUsers.Open Sql$, dcndb, adOpenForwardOn ly, adLockReadOnly
            >
            DAO Code 20 Seconds
            >
            Set rDb = DBEngine.Worksp aces(0).OpenDat abase(dtbs$)
            Set rsUsers = rDb.OpenRecords et(Sql$)
            >
            >
            >
            *** Sent via Developersdex http://www.developersdex.com ***
            >

            Comment

            • aaron.kempf@gmail.com

              #7
              Re: DAO vs ADO

              DAO isn't included in WIndows XP, Office 2000 or Office 2002

              get a fucking clue kids

              DAO has been obsolete for a decade
              it's _NEVER_ been faster

              -Aaron


              Harry Strybos wrote:
              "Alan Welsford" <men1720@kingsl ey.co.zawrote in message
              news:u82HNxwLHH A.3668@TK2MSFTN GP02.phx.gbl...
              ADO Code 66 Seconds

              Set dcndb = New ADODB.Connectio n
              dcndb.Provider = "Microsoft.Jet. OLEDB.4.0"
              dcndb.Connectio nString = "Data Source=" + dtbs$
              dcndb.Open
              Set rsUsers = New ADODB.Recordset
              rsUsers.Open Sql$, dcndb, adOpenForwardOn ly, adLockReadOnly

              DAO Code 20 Seconds

              Set rDb = DBEngine.Worksp aces(0).OpenDat abase(dtbs$)
              Set rsUsers = rDb.OpenRecords et(Sql$)



              *** Sent via Developersdex http://www.developersdex.com ***
              >
              Well, the 66 seconds for ADO does seem an inordinate time as does 20 seconds
              for DAO, however, the query may be designed to be resource intensive.
              >
              DAO has always far outperformed ADO (ADO.Net appears to have bridged that
              gap to some extent). It should be noted that ADO does have a higher overhead
              given the added functionallity it exposes. Having said that, DAO does
              perform beautifully and still exposes enough methods to please most. Just to
              get a new identity value in DAO leaves ADO for dead.
              >
              If you want to use Access as a back end, DAO is your man. This statement may
              be inappropriate given the following:
              >
              1. Have not tested how DAO plays with Access 2007
              2. Given the massive changes MS have made to VB, DAO may not work at some
              later date. Our tests with Vista show DAO is still fine there.
              3. DAO can still exhibit some data instability, althought this seems to
              be a rare occurrence.
              >
              Just by coincidence, I am currently finishing a VB6/DAO project for a
              friend. While I really love the power of VB.Net, the VB6/DAO combination is
              still really cool for a quick rollout.
              >
              Cheers
              >
              Harry

              Comment

              • Franck

                #8
                Re: DAO vs ADO


                aaron.kempf@gma il.com wrote:
                DAO isn't included in WIndows XP, Office 2000 or Office 2002
                >
                get a fucking clue kids
                >
                DAO has been obsolete for a decade
                it's _NEVER_ been faster
                >
                -Aaron
                DAO was always faster than ADO for Access DB. But since the new ADO.Net
                there is people saying it's faster some say it's equivalent.

                Comment

                • aaron.kempf@gmail.com

                  #9
                  Re: DAO vs ADO

                  you're so fucking full of shit dude

                  DAO was never faster ONCE than ADO

                  -Aaron



                  Franck wrote:
                  aaron.kempf@gma il.com wrote:
                  DAO isn't included in WIndows XP, Office 2000 or Office 2002

                  get a fucking clue kids

                  DAO has been obsolete for a decade
                  it's _NEVER_ been faster

                  -Aaron
                  >
                  DAO was always faster than ADO for Access DB. But since the new ADO.Net
                  there is people saying it's faster some say it's equivalent.

                  Comment

                  • Franck

                    #10
                    Re: DAO vs ADO


                    aaron.kempf@gma il.com wrote:
                    you're so fucking full of shit dude
                    >
                    DAO was never faster ONCE than ADO
                    I tried few query :
                    at 1241 record output DAO is 4 sec faster than ADO
                    at 11635 record output DAO is 17 sec faster than ADO

                    DAO ADO jet.4.0 in access

                    so your comment doesnt apply to my case, i was always faster than ADO
                    for me and it's still faster, maybe depend on your opinion that is
                    wrong and youll keep stick to it because i know you are closed minded

                    Comment

                    • aaron.kempf@gmail.com

                      #11
                      Re: DAO vs ADO

                      these are my results
                      at 1241 record output ADO is 4 sec faster than DAO
                      at 11635 record output ADO is 17 sec faster than DAO

                      seriously.. you're fucking deranged MORON!

                      provide your sql fucker, or are you scared to?

                      give me a MDB that will compare and contrast, show me your VBA.

                      and for the record; DAO does take LONGER during development; so it's
                      pointless because DAO has a negative ROI

                      and of course, DAO isn't included in Windows or Access.
                      so it's slower execution, slower development, _HUGE_ risk of memory
                      leaks.. and of course DAO is a fucking pain in the ass to deploy. DAO
                      hasn't even been included in MDAC for a few years now buster

                      and when you lose the fucking training wheels you fucking pansy--
                      try comparing JET DAO against SQL ADO

                      I don't think that I've run into a single sql statement in the past
                      month that takes more than a second in ADO

                      MDB & ADO is an impractical choice because everyone knows that MDB is
                      obsolete and worthless.

                      Lose the training wheels fucknut; I can scan a billion records in SQL
                      Server with sub-second response times.

                      It is called Analysis Services, fucknut

                      when MDB and your piddly little MDB supports their own Olap engine is
                      when I go back to the 90s and start using DAO

                      -Aaron


                      Franck wrote:
                      aaron.kempf@gma il.com wrote:
                      you're so fucking full of shit dude

                      DAO was never faster ONCE than ADO
                      I tried few query :
                      at 1241 record output DAO is 4 sec faster than ADO
                      at 11635 record output DAO is 17 sec faster than ADO
                      >
                      DAO ADO jet.4.0 in access
                      >
                      so your comment doesnt apply to my case, i was always faster than ADO
                      for me and it's still faster, maybe depend on your opinion that is
                      wrong and youll keep stick to it because i know you are closed minded

                      Comment

                      • mg

                        #12
                        Re: DAO vs ADO

                        OK peeps, hands up who really cares? It's much more interesting
                        watching aaron.kempf trying to be relevant! Keep trying, PHP guy!

                        Comment

                        • Franck

                          #13
                          Re: DAO vs ADO


                          mg wrote:
                          OK peeps, hands up who really cares? It's much more interesting
                          watching aaron.kempf trying to be relevant! Keep trying, PHP guy!
                          hehe : ), i have to tell you your not the first one finding that about
                          him. He screw a groups of 215 post in last November now all the subject
                          are screw and multiple subject are mix for a unknown reason because of
                          him :P. search for vb.net isn't stable or something like that. This guy
                          is a jerk. he was like that since a while and he is still like that and
                          i dont think it will ever change, i know how he is, He's sure he is
                          always right and only what he does is the best. don't even try argue
                          with his because he think everyone a looser, he's just a funny close
                          minded guy.

                          Comment

                          • aaron.kempf@gmail.com

                            #14
                            Re: DAO vs ADO

                            im not close minded

                            mother fucking niggers and chinks invented a new language; and they
                            don't put enough effort into VB.net to make it a competitive platform

                            they killed the worlds most popular langauge and you retards don't even
                            know the difference

                            Vb6 had a great ROI.
                            VB.net is a utter waste of time.. the framework isn't on ANY desktops
                            _OR_ servers

                            -Aaron

                            Comment

                            • raibeart

                              #15
                              Re: DAO vs ADO

                              I agree Aaron you are not closed minded.

                              YOU HAVE TO HAVE ONE BEFORE YOU CAN CLOSE IT.

                              Just go away. If you don't like VB.Net, get the hell out of here are
                              leave us alsone.


                              aaron.kempf@gma il.com wrote:
                              im not close minded
                              >
                              mother fucking niggers and chinks invented a new language; and they
                              don't put enough effort into VB.net to make it a competitive platform
                              >
                              they killed the worlds most popular langauge and you retards don't even
                              know the difference
                              >
                              Vb6 had a great ROI.
                              VB.net is a utter waste of time.. the framework isn't on ANY desktops
                              _OR_ servers
                              >
                              -Aaron

                              Comment

                              Working...