Adodb

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sassy2009
    New Member
    • Oct 2009
    • 15

    Adodb

    Hi BYTERS,

    iam new to access VBA and i cant find ADODB in my objects list. I wanted to create Dim cnn1 as ADODB.Connectio n but all i can see is the DAO.
    Access 2007 on windows7.

    Please help....

    Sassy2009
  • Delerna
    Recognized Expert Top Contributor
    • Jan 2008
    • 1134

    #2
    From the code window you need to do the following

    select from the menu's "Tools/References"

    A references window will pop up
    You will notice that something like "Microsoft DAO 3.6 Object Library"
    is checked. This is why you can see the DAO objects in the objects list.

    Scroll down and find and check
    "Microsoft ActiveX Data Objects 2.1 Library"
    At least that is what it is on my version. It will probably be different on yours but should be named similar to that.

    Say OK and you should now be able to use the ADODB objects.


    It should be OK if you went back into the references and uncheked the DAO reference if you are not going to use them. It should be OK to leave DAO checked too.
    Not sure if there is a performance hit from having references enabled that you are not using?
    I have never bothered to research that question...perh aps I should.
    I have a feeling that the more of these things that are checked then the longer Access would take to open? but not sure.


    Note
    Any time you want to use any kind of object and it dosn't appear in the list then you will have to identify the "type library" used and then go through this process to enable it.

    Comment

    • sassy2009
      New Member
      • Oct 2009
      • 15

      #3
      thanks Delerna. I clicked on Tools/reference but ActiveX Data Objects was not on the list. But i searched for the ADO.net services from the MSDN and downloaded the .exe file from there. Then i went into Tools/Reference and found the ActiveX data objects in the list and checked them.

      This the url were i downloaded from



      Thanks for your help....

      Comment

      Working...