CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 1999
    Location
    Ohio, USA
    Posts
    163

    Can't create object

    I installed a VB program (using VB, SQL Server, Access 97) on a new machine. And I am getting an error:

    429 AxtiveX component can't create object.

    I reinstalled "mdac" and "dcom" but still getting the error. What could be the solution for this problem?




  2. #2
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: Can't create object

    When an import in the SQL Server version of Usage Analyst begins, the following error may occur:
    Error 429 ActiveX component can't create object. Couldn't connect to <databasename>
    CAUSE
    This problem occurs because the Uas.exe is not being registered.
    WORKAROUND
    To resolve this problem, perform the following steps:
    Locate Uas.exe on the drive.
    From the command line, change to the directory where Uas.exe resides.
    Type uas.exe /regserver.
    '=============================================

    ACTIVEX CAN'T CREATE WHICH OBJECT?
    When working on a large VB application that uses hundreds of COM objects, the "429 can't
    create object" error doesn't give you much help in determining which object could not be created.
    You can get around this limitation by writing a function to wrap the VB runtime CreateObject
    function:

    Public Function CreateObject(sProgID as string) _
    as object
    On Error Goto CreateErr

    ' Call the VB runtime CreateObject function
    Set CreateObject = VBA.CreateObject(sProgId)

    Exit Function
    CreateErr:
    ' return the error with the name of the object
    'that could not be created
    Err.Raise Err.Number, _
    "CreateObject Wrapper", Err.Description & _
    ": '" & sProgID & "'"
    End Function

    With this wrapper function, you get the 429 error and the name of the object that could not be
    created.
    '============================================================================
    This problem happens when you use an ActiveX control in your program and the ActiveX control is not
    registered in the registry. If it works on the Development PC, it must be an incompatibillity between your
    control and the same control installed in the user PC. To fix this check which ActiveX controls you need in
    order to run your program and make sure all of them are placed in the SYSTEM folder. You should know which
    control is the one that's giving you so much trouble (it must be in the Form that crashes your program) so
    you'll have to manually register it. To do it you have two basic choices: Do it through Windows Explorer or
    through a DOS Prompt Window. If you are using the Explorer just drag and drop your
    control into REGSVR32.EXE (Both must be in the SYSTEM folder) or
    in the Dos Prompt window be sure you are in the SYSTEM folder
    and tye REGSVR32 [YourControlName].OCX After doing this you
    should see a message box saying that the registration process
    succeeded. If it fails, then you will have to dig inside the
    registry and find all the keys that references the control to
    delete them. Then you'll have to repeat the registration
    process.

    '============================================================================
    Error 429 means that there is a component that isn't correctly registered. The PDW is supposed to take care
    of this, but sometimes it forgets. I doubt its an ADO component, just because since it is referenced in
    different ways so the PDW couldn't overlook it. Does your project have any custom controls or DLLs that
    were written by you or your company. These it may not pick up and register properly. If you find that this
    problem is only occurring on one machine, see if you can manually register the suspected controls by going
    to the start-run menu and typing "regsvr32 <dll or ocx path and name>". if it still doesn't work - look into
    rebuilding the setup package with the PDW and examine every option and/or another setup packager
    (Wise or Install Shield).

    '=============================================================================

    Here's another clue:
    You are refrencing an ado library that is the latest and geratest on your machine but when you try
    to package the exe PDW by dafault picks up from its own repository of redistribution components which
    normally has a version which is older.
    So what happens the PDW picks up the ADO library all right automatically based on the Reference setting in
    your project but it picks up the older version.
    If this is the case then
    For this replace the Mdac_typ.exe in the
    C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\Redist with the latest Mdac_typ.exe


    '============================================================================
    'check this
    Goto Project|References from the vb menu. Look for a ActiveX control that has MISSING next to it.
    If you see a missing that's the problem. It can't find it. Sometimes it is a activeX version problem, you may
    just need to pick a different version of the missing ActiveX control. Ot you may need to somehow install
    the missing control or not use it. As for where the debugger shows the problem, it's a red herring, just look
    for the MISSING control in references.




    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured