• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4419
  • Last Modified:

Runtime error 429 creating ADO 2.8 object in XP SP2

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!

1 Solution
Anthony PerkinsCommented:
For the record MDAC has no JET components included and hasn't since version 2.6
lbusseyAuthor Commented:
I was merely giving all information that I thought might be useful.
Anthony PerkinsCommented:
So was I.
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

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 http://www.randem.com/support.html
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.
Anthony PerkinsCommented:
>>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.
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
lbusseyAuthor Commented:
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

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now