PDA

Click to See Complete Forum and Search --> : DAO Problem


RaiderDav
May 21st, 2000, 10:48 PM
For some reason, when I try to use OpenDatabase within any program on my PC, I get an error that looks like this:
Run-time error '429'
ActiveX component can't create object
I get this error when trying to run any code that uses OpenDatabase, even example programs that I've downloaded from the internet that work on my other PCs. If I try to compile the code into an .EXE, I get a "Permission Denied" error when it reaches the OpenDatabase command in the code. However, if I run an executable compiled on another PC of the same code, the executable connects to the Access database just fine on this problematic PC. Anyone have any ideas on how I can get this fixed? I've tried reinstalling the DAO .dll files, Visual Basic and Office. I'm running VB5 with SP3 installed and Access '97. Any help would be appreciated.

Thanks,
David

May 21st, 2000, 11:36 PM
Hello,

I found this referance in the MSDN Library:
----------------------------------------------------------

ActiveX component can't create object or return reference to this object (Error 429)


Creating objects requires that the object's class be registered in the system registry and that any associated dynamic-link libraries (DLL) be available. This error has the following causes and solutions:

The class isn't registered. For example, the system registry has no mention of the class, or the class is mentioned, but specifies either a file of the wrong type or a file that can't be found.
If possible, try to start the object's application. If the registry information is out of date or wrong, the application should check the registry and correct the information. If starting the application doesn't fix the problem, rerun the application's setup program.

A DLL required by the object can't be used, either because it can't be found, or it was found but was corrupted.
Make sure all associated DLLs are available. For example, the Data Access Object (DAO) requires supporting DLLs that vary among platforms. You may have to rerun the setup program for such an object if that is what is causing this error.

The object is available on the machine, but it is a licensed Automation object, and can't verify the availability of the license necessary to instantiate it.
Some objects can be instantiated only after the component finds a license key, which verifies that the object is registered for instantiation on the current machine. When a reference is made to an object through a properly installed type library or object library, the correct key is supplied automatically.

If the attempt to instantiate is the result of a CreateObject or GetObject call, the object must find the key. In this case, it may search the system registry or look for a special file that it creates when it is installed, for example, one with the extension .lic. If the key can't be found, the object can't be instantiated. If an end user has improperly set up the object's application, inadvertently deleted a necessary file, or changed the system registry, the object may not be able to find its key. If the key can't be found, the object can't be instantiated. In this case, the instantiation may work on the developer's system, but not on the user's system. It may be necessary for the user to reinstall the licensed object.

You are trying to use the GetObject function to retrieve a reference to class created with Visual Basic.
GetObject can't be used to obtain a reference to a class created with Visual Basic.

Access to the object has explicitly been denied.
For example, you may be trying to access a data object that's currently being used and is locked to prevent deadlock situations. If that's the case, you may be able to access the object at another time.

Copyright MSDN April 2000


----------------------------------------------------------
Sounds like to need to set a referance to the DOA in your project.

Hope this helps a little

RaiderDav
May 21st, 2000, 11:57 PM
Thanks for the help, but I do have a reference to the DAO in my project. But I don't know if the DAO is correctly installed in the registry. Does anyone know of a way to reinstall the DAO .dll files so that it is correctly linked in the Windows registry?

>A DLL required by the object can't be used, either because
>it can't be found, or it was found but was corrupted.
>Make sure all associated DLLs are available. For example,
>the Data Access Object (DAO) requires supporting DLLs that
>vary among platforms. You may have to rerun the setup
>program for such an object if that is what is causing this
>error.

pardede
May 22nd, 2000, 03:57 AM
Try this:
Unregister and re-register the dao.dll using regsvr32.exe
you can do this by typing in the "Run" dialog box (Start menu):
regsvr32 -u "c:\path to dao\dao350.dll
regsvr32 "c:\path to dao\dao350.dll

if this does not work maybe the license information on the PC is corrupted, on the microsoft site you can find a fix for this:
http://support.microsoft.com/support/kb/articles/q181/8/54.asp

RaiderDav
May 22nd, 2000, 05:21 AM
Thank you so much! Unloading and registering the .dll file didn't work, but the link you sent from the Microsoft Knowledge base fixed everything. Apparently the license information was corrupt, but the file I downloaded from the MS site fixed it. Thanks again to all that helped, hope I can lend a hand in the future.

David

pardede
May 22nd, 2000, 02:52 PM
Cool!

Glad it helped. :D:D:D