Microsoft KB Archive/189366

From BetaArchive Wiki
Knowledge Base


Article ID: 189366

Article Last Modified on 1/23/2007



APPLIES TO

  • Microsoft Access 97 Standard Edition



This article was previously published under Q189366

Moderate: Requires basic macro, coding, and interoperability skills.


SYMPTOMS

You install a Microsoft Access run-time application and when you run code, you receive the following error message:

Run-time error '429':
ActiveX component can't create object

CAUSE

You installed the run-time application on a computer on which Microsoft Access has never been previously installed. This error can occur when the DAO Automation Server license key is unavailable in the system registry and your code contains DAO statements that do not include the Application object, DBEngine. The DAO Automation Server license key is used to verify that the application has authorization to use the server.

This error message can also occur on a computer that has Microsoft Access installed if the following conditions are true:

  • The Data Access Objects (DAO) Object Library, Dao350.dll, was not properly registered when Microsoft Access 97 was installed.


-and-

  • You subsequently used Regsvr32.exe to register Dao350.dll.

When the application calls DAO through Visual Basic for Applications code, the client application, in this case Visual Basic for Applications, does not provide the DAO license key. For example, the following code

Set dbs = OpenDatabase("<path>\<filename>")
                

would not provide the DAO license key because Access is using Visual Basic for Applications as the application.

RESOLUTION

You can get Microsoft Access to provide its DAO license key by using DBEngine as the application object in the call to DAO. For example, the following code

Set dbs = DBEngine.OpenDatabase("<path>\<filename>")
                

would provide the DAO license key because Microsoft Access is explicitly referencing DBEngine, the DAO object.

Although you only need to reference the Application object, DBEngine, the first time that you use DAO, it is good programming practice to use the Application object any time that you reference DAO functionality in code.

MORE INFORMATION

This error message does not imply that an ActiveX control is involved. In this case, DAO, an ActiveX component, cannot create an object because the DAO Automation Server cannot be started.

When using the DAO server, there are two ways the DAO license key can be provided for verification:

  • An application, such as Microsoft Access, can place a license key in the registration database during installation.
  • The client application can pass the license key to DAO when the call is made.


REFERENCES

For additional information about Error 429, click the article number below to view the article in the Microsoft Knowledge Base:

244264 INFO: Error 429 When Automating Office Applications



Additional query words: run-time error 429 activex component can t create object

Keywords: kberrmsg kbprb KB189366