none
Working with Record Sets DAO or ADO or ADO.NET or What? RRS feed

  • Question

  • According to Allen Browne's article here

    "DAO is the native Access library (what Access itself uses), whereas ADO is a more generic library (now superseded by the vastly different ADO.NET library.)"

    Question 1: Is it still OK to use DAO as:

    Dim rs As DAO.Recordset

    Question 2: Is it still OK to use ADO as:

    Dim rs As ADO.Recordset

    Question 3: Are DAO and ADO being depreceated in favor of ADO.NET?

    or what?

    Sunday, July 26, 2015 11:12 AM

Answers

  • DAO was, is and will be the 'native' data object model for Access. You can set a reference in Tools > References... to the Microsoft DAO 3.6 Object Library for a .mdb database, or to the Microsoft Office n.0 Access database engine Object Library for a .accdb database, and use

    Dim rs As DAO.Recordset

    For use within Access, DAO is usually the most efficient and easy-to-use option.

    ADO is a good alternative if you want to work with non-Access data sources. If you set a reference to one of the versions of the Microsoft ActiveX Data Objects m.n Library, you can use

    Dim rs As ADODB.Recordset

    Note that the code name of the library is ADODB, not ADO.

    ADO.Net is not for use within Access itself; you can use it to work with Access and other data sources in Visual Studio languages such as C# and VB.Net.


    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    • Proposed as answer by Dirk Goldgar Sunday, July 26, 2015 1:19 PM
    • Marked as answer by Fran_3 Sunday, July 26, 2015 8:48 PM
    Sunday, July 26, 2015 1:12 PM