Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

DBEngine.compactdatabase won't work without Access Installed. Missing Reference ?

Posted on 2004-08-03
10
Medium Priority
?
766 Views
Last Modified: 2012-05-05
I have a VB6 project on a Windows 98 machine with SP6 installed. I am using MS Access 2000. When I do the compact everything is fine unless Access is not installed on the users machine. If I remove Access I get the error Activex component can't create object. There are no references marked as missing. Do I need to add a reference manually from somewhere ? I have tried adding and removing just about every reference on the list. And also P&D Wizard gives same results in package. Thanks.
0
Comment
Question by:tim522522522
  • 5
  • 4
10 Comments
 
LVL 32

Expert Comment

by:jadedata
ID: 11711148
The MSAccess runtime engine components should be some of the references in your project.  The dbengine object, I do believe, is made available by and control through the DAO*.dll and some other components.  Without this the app can not instantiate the object.
0
 
LVL 34

Expert Comment

by:flavo
ID: 11711292
Your right Jack,

dbengine is in the DAO3??.dll

Dave
0
 

Author Comment

by:tim522522522
ID: 11711296
I do see an Access 9.0 object library that is an included reference. This changes to MISSING when I remove Access. I then added it back in manually by copy and paste from the CD. This worked, the reference does not show as missing but the compact still doesn't work. So I guess there are other references I need, but I dont know what they are.

Some other references that are included are Visual Basic For Applications, OLE Automation among a few others. Does anyone know what I need to add and where to find it. Thanks.
0
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
LVL 34

Expert Comment

by:flavo
ID: 11711310
If you're using VB, the Setup Wizard WILL pick up your references and include the necessary dlls.  When you install all will be sweet.

0
 

Author Comment

by:tim522522522
ID: 11711332
I have tried adding the DAO 3.51 & 3.60 references if that is what you mean? But I still have the same problem.
0
 

Author Comment

by:tim522522522
ID: 11711338
Flavo, I do use the Setup Wiz, I then install on a clean machine with no MS Access installed. It doesn't work.
0
 
LVL 34

Accepted Solution

by:
flavo earned 2000 total points
ID: 11711345
Only add 1 of them

then use something like

Dim dbe As DAO.DBEngine
Set dbe = New DAO.DBEngine
   
    'compact
    dbe.CompactDatabase sourcefile, destfile
    'rename it back the way it was
    Kill sourcefile
    Name destfile As sourcefile

Set dbe = Nothing
0
 
LVL 34

Expert Comment

by:flavo
ID: 11711349
DOes the DAO??Dll get registed on the "clean" pc.

0
 

Author Comment

by:tim522522522
ID: 11711463
Flavo, I reloaded everything clean and this time i did not reference Access 9.0 object library. Just DAO 3.6 and it works. Before I was referenceing both, I don't understand why this worked, mabey some conflict? I am new to this. Thanks it is working now.
0
 
LVL 34

Expert Comment

by:flavo
ID: 11711497
Glad it all worked out mate
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

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

927 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