Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Distributing Access components

Status
Not open for further replies.

markbeeson

Programmer
Jun 14, 2003
19
0
0
NZ
I've got an application that includes a feature to compact and repair the access database that runs the application.

Whenever I try to install it on a machine that doesn't have access installed it gives me the error 'cannot create activex component'

I've included msacc8.olb in the setup package - any idea what's going on.

Here's the code that calls the function.

Dim oAccess As Access.Application
Set oAccess = CreateObject("Access.Application.8")

oAccess.DBEngine.RepairDatabase CurrentDB
Set oAccess = Nothing


 
You cannot use the Access.Application object if the client doesn't have a licensed version of MS ACCESS, or it's run time files.
And you are not allowed to distribute the MS Access runtime files. You can only do this with MS Office Developers edition.

I think it bad advice of anyone in any forum, book, or whatever, to suggest using some object like this with-out advising of the distribution "problems", meaning, that in order to use it, the client needs a licensed version of MS Access (when someone asks explicitly how to use it, as you now have, that is different).
Maybe this was or wasn't the case with you. I'm only saying this because you ARE using it, but cannot understand why it is not working. Someone must have directed you to use it?

If all that you are using the object for is to compact a MDB, then use either DAO (adding a reference to that) and the Compact method, or better, JRO (Microsoft Jet and Replications Object Library") which has a compact method (do a search in this forum, or the MS VB Database forum using the keyword "JRO").
You will need to add a reference to this, and distribute it with your application.
As always, read the EULA of any product component you are distrubuting a component for which is not included as a component authorized for distribution, as listed in the VB Redist.Txt file, or not included in this file with full distribution rights.
 
Thanks for the advice although the licencing lecture was unnecessary.
It pretty much goes without saying that you don't distribute without the propery authority.

The question was simply - can it be done? I'm not sure whether your reply answers my question but at least you've presented me with other ways around the problem.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top