Solved

Detecting DAO and it's version

Posted on 2002-05-15
3
265 Views
Last Modified: 2008-03-04
Let me start off by telling you what I'm trying to do.  I'm writing a component checker to detect if a component is installed and what it's version is.  I'm detecting things like ADO, DTS, DMO, and DAO.  I'm trying to do this with out setting any project references, so yes I'm using late binding.  Please save the lecture of the evils of late binding, I already know.  This program is not doing much other than provide me with a users system info, to try and make my life easier when the call up complaining that something doesn't work because they didn't read the release notes and didn't follow instructions about installing components.  I digress...

The one that's giving me the biggest problem is DAO.  The following is an example piece of code:
    Dim lTemp    
    Set lTemp = CreateObject("DAO.Recordset")

All the other have not given me any problem.  I really don't want to go looking for files on their hard drive either.

Any have an idea on how to detect DAO and report it's version using a late binding method?

Steve
0
Comment
Question by:Steve Sirica
3 Comments
 
LVL 6

Expert Comment

by:pierrecampe
Comment Utility
if DAO is installed then there is a registry key for it
for 3.5 it is:
HKEY_CLASSES_ROOT\DAOEngine.35
for 3.6 it is:
HKEY_CLASSES_ROOT\DAOEngine.36

0
 
LVL 14

Accepted Solution

by:
Matti earned 50 total points
Comment Utility
Hi!

I have here one latebinding sample.

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=29536&lngWId=1

Those very old versions seems to not support latebinding, they are not creatable!

Matti
0
 
LVL 4

Author Comment

by:Steve Sirica
Comment Utility
That's what I was looking for.  
I was using:
    createobject("dao.dbengine")
when I should hev been using:
    createobject("dao.dbengine.36")
     or
    createobject("dao.dbengine.35")

Thanks for your help
Steve
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now