Solved

Detecting DAO and it's version

Posted on 2002-05-15
3
266 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
ID: 7012646
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
ID: 7012753
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
ID: 7013556
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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 Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

786 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