Solved

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

Posted on 2004-08-03
10
733 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
[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
  • 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
Industry Leaders: 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!

 
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 500 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

752 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