Runtime error 429 creating ADO 2.8 object in XP SP2

Posted on 2005-04-08
Last Modified: 2013-12-25

My development machine has VB6 SP6, XP Pro SP2, MDAC 2.81, Jet 4.0 SP8

I've developed a fairly simple frontend desktop application in Visual Basic 6. It interacts with a MS Access database. I've included the reference to "Microsoft ActiveX Data Objects 2.8 Library". I can compile and run the application on my development system, as well as numerous other platforms, including XP Pro/Home SP1/SP2.

Now, my problem is this:
I have installed the program on to a Dell Inspiron 1100 laptop with XP Home SP2. When attempting to run the application it encounters the famous runtime error 429 "ActiveX component can't create object". This happens at the time the program tries to create the ADO object.

Here is a sample of the code:
Public Function OpenDB(strDBPath As String) As Long

    On Error Resume Next

    'Prompt for database location if default location doesn't exist
    If Dir(strDBPath, vbNormal) = "" Then
        MsgBox "Database is not found!" & vbCrLf & "[" & strDBPath & "]", vbCritical, "Database Not Found"
        OpenDB = 1
    End If
    'Set the connection string for the Jet 4.0 datasource
    sCn = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
        "Persist Security Info=False;" & _
        "Mode = " & adModeReadWrite & ";" & _
        "Data Source = '" & strDBPath & "';"
    'Initialize the ado control
    adoCn.ConnectionString = sCn
    OpenDB = Err.Number

End Function
adoCn is a public variable as type ADODB.Connection. Just before I call that function in the Sub Main I initialize the adoCn variable as follows:
Set adoCn = New ADODB.Connection

I'm not sure why this works on all other computers except the ONE computer. I've checked the MDAC dll's, tlb's, and everything else in the Program Files\Common Files\System\ADO directory. I've also tried running the latest version 2.8 of MDAC_TYP.exe downloaded from Microsoft's website. And, as a last resort I've tried installing the latest version of Jet 4.0 SP8. Trying to install either of those on a XP SP2 machine tells me that they're outdated.

Other things I've tried are using ADO 2.7 and creating the object with the CreateObject function. All of these give the same runtime error.

Thanks in advance for any help!

Question by:lbussey
    LVL 75

    Expert Comment

    by:Anthony Perkins
    For the record MDAC has no JET components included and hasn't since version 2.6
    LVL 1

    Author Comment

    I was merely giving all information that I thought might be useful.
    LVL 75

    Expert Comment

    by:Anthony Perkins
    So was I.
    LVL 7

    Expert Comment

    LVL 10

    Expert Comment

    acperkins is correct. You will need to install MDAC 2.6 to include the jet componets used by MS Access.

    I find the install "Automatic OS Updater for MDAC/JET/DCOM" from here
    useful. It is kept up to date with the required releases of MDAC and Jet. I use the "All Windows" version with any install I do that makes use of MDAC/JET. I know it's a bit of over kill (a 30MB+ install), but it saves the problem of missing dlls.
    LVL 75

    Expert Comment

    by:Anthony Perkins
    >>You will need to install MDAC 2.6 to include the jet componets used by MS Access.<<
    You should be able to install the JET components separately.  Also and for the record, there were not JET components in 2.6 either.
    LVL 12

    Accepted Solution

    I just had this same problem with an ADO/SQL integration.  Runtime error '429' on an XP SP2 machine.  ADO connections failed at
     Set machLogCon = New ADODB.Connection

    No other machines having this problem.  I ran the MDAC integrity checker from the above link
    and it found registry key inconsistencies.  So just reinstall MDAC 2.8, right?  Well unfortunately MDAC 2.8 RTM won't install on XP SP2, since it's already got 2.8 SP1.  Found another solution, right click mdac.inf and click install.  mdac.inf should be in C:\windows or c:\windows\ServicePackFiles\i386

    First round of files were found in the same folder.  One file, handler.reg, was at c:\i386

    Ran integrity checker after this, no more inconsistencies, and no more runtime error
    LVL 1

    Author Comment

    Thanks for the info benhanson. It worked exactly as you described and fixed my problem.

    My client is one happy camper! (or in this case, tree planter =) )

    Thanks again!

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
    If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

    754 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

    Need Help in Real-Time?

    Connect with top rated Experts

    25 Experts available now in Live!

    Get 1:1 Help Now