?
Solved

Detecting DAO and it's version

Posted on 2002-05-15
3
Medium Priority
?
271 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 200 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

762 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