Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


WindowsXP service pack2 : Error429 ActiveX component can't create object

Posted on 2004-10-05
Medium Priority
Last Modified: 2008-01-09
Only on windowsXp service pack 2, I am unable to run my application.
I created a small sample hereby included which doens't work on Xp 2

The error from above arises on : "Set dbConn = New ADODB.Connection"

Any idea please?

Option Explicit
Dim dbConnection As ADODB.Connection
Dim dbConnection_Selections As ADODB.Connection
Dim strConnection As String
Dim rsTable As ADODB.Recordset
Dim rsTable_Selections As ADODB.Recordset

Private Sub Form_Load()
Screen.MousePointer = vbHourglass
SendToErrorFile "DBS is being loaded", True
DB_OpenLocalDBConnection dbConnection, "C:\wvb.mdb"
DB_OpenLocalDBTable dbConnection, rsTable, "tbl_Data"
SendToErrorFile "DBS loaded", False
Screen.MousePointer = 0
End Sub

Sub SendToErrorFile(msg As String, bKill As Boolean)
Dim strfile As String
Dim nFile As Integer
nFile = FreeFile
strfile = "c:\0Testfile.txt"
If bKill = True Then FileExist strfile, True
Open strfile For Append As nFile
Print #nFile, Format$(Now, "d mmm yyyy hh:mm:ss") + " - " + msg
Close #nFile
End Sub

Sub DB_OpenLocalDBConnection(dbConn As ADODB.Connection, strDBFile As String)
Dim strConnection As String
'strConnection = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" + strDBFile
strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source =" + strDBFile
SendToErrorFile strConnection, False
Set dbConn = New ADODB.Connection
SendToErrorFile "db Connection Set", False
dbConn.Open strConnection
SendToErrorFile "db Connection Opened", False
End Sub

Sub DB_OpenLocalDBTable(dbConn As ADODB.Connection, rst As ADODB.Recordset, strTableToOpen As String)
   Set rst = New ADODB.Recordset
    SendToErrorFile "Table Set", False
   rst.CursorType = adOpenKeyset  'adOpenStatic
   SendToErrorFile "CursorType Set", False
   rst.LockType = adLockOptimistic  'adLockBatchOptimistic
   SendToErrorFile "LockType Set", False
   rst.Open strTableToOpen, dbConn, , , adCmdTable
   SendToErrorFile "Table Open", False
End Sub

Function FileExist(strFileName As String, Optional KillIt As Boolean, Optional CopyKillIt As Boolean) As Boolean
Dim nFile As Integer
On Error Resume Next
nFile = FreeFile
Open strFileName For Input As nFile
If Err.Number <> 0 Then
    FileExist = False
    FileExist = True
End If
Close nFile
If KillIt = True Then
    Kill strFileName
End If
End Function

Question by:pgins
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 5
LVL 26

Expert Comment

ID: 12226789
Have you added the ms ADO reference?

Author Comment

ID: 12226944
In the ref I have the Microsoft ActiveX Data Objects 2.5 Library  msado25.tlb

Additional info : I used the microsoft application wizard to create a setup for the demo hereby included
and indeed this file gives a can't registration error on xp version2


Author Comment

ID: 12228478
Additional info:
after replacing the msado25.tlb by the msado15.dll the setup needs the mdac_type.exe
when downloading mdac_type.exe 2.8 from microsoft and trying to install mdac we have MDAC 2.8 RTM incompatibilty error.

Indeed the register already contains in
LOCAL_MACHINE\SOFTWARE\Microsoft\DataAccess\fullinstalvers = 2.81.1117

Which file is missing or what should be changed in the source to make it compatible with xp version2 ?

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 12232828
After installing mdac 2.8 on proper unit, the reference file msado15.dll is in VB automatically replaced by msado27.tlb.
But after compilation and reinstalling a new created setup file : still the same error on WindowsXP Sp2
I also verified if those files are on the xp sp2 unit; they are.
Somebody has any idea please?

LVL 26

Expert Comment

ID: 12236414
1. Have you tried to add 2.8 as ado reference on your vb project?

2. You can also use late binding


Dim dbConnection As object

set dbConnection =createobject("ADODB.Connection")



Author Comment

ID: 12236714
1. Yes I did so
2. Replaced code with yr proposal

Private Sub Form_Load()
Dim dbConnection As Object
On Error GoTo errorhandler
  SendToErrorFile "DBS being loaded", True
strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = C:\wvb.mdb"
  SendToErrorFile strConnection, False
Set dbConnection = CreateObject("ADODB.connection")
  SendToErrorFile "Setted", False
dbConnection.Open strConnection
  SendToErrorFile "db Connection Opened", False
Exit Sub
MsgBox Str$(Err.Number) + ":" + Err.Description + Str$(Err.HelpContext) + Err.HelpFile
End Sub

Result from testfile should be :
6 okt 2004 14:09:44 - DBS being loaded
6 okt 2004 14:09:44 - Provider=Microsoft.Jet.OLEDB.4.0;Data Source = C:\wvb.mdb
6 okt 2004 14:09:44 - Setted
6 okt 2004 14:09:45 - db Connection Opened
6 okt 2004 14:09:45 - DBS loaded

But error 429 (1000429) on XP SP2 before object is set online : Set dbConnection = CreateObject("ADODB.connection")
Meanwhile it seems to work on some XP SP2 units and on some not.
When latest MDAC or JET is loaded from microsoft > no way to start setup since files on unit are more recent then the downloaded files

LVL 26

Expert Comment

ID: 12236809
You meant it still failed on the line

Set dbConnection = CreateObject("ADODB.connection")


Author Comment

ID: 12237365
Yes it do (sorry for my long answer I only want to give maximum info)
LVL 26

Accepted Solution

EDDYKT earned 1500 total points
ID: 12237431
Only one suggestion, turn off the firewall and try again

from control panel->windows firewall->off

and try

or add your task on the advanced tab

Author Comment

ID: 12237782
Tried both, still the same

Author Comment

ID: 12239615
I replace ref by Microsoft DAO 3.6 Object library (dao360.dll)
Removed all adodb.connections
Replaced dbconnection.execute by dbconnection.openrecordset and a few other items

Dim dbConn as database
Dim rst as recordset

Set dbConn = OpenDatabase(strDBFile)
Set rst = dbConn.OpenRecordset(strTableToOpen)

works fine with XP sp2

So if somebody search for 429 error on xp sp2 : remove all yr adodb connections, I gave it up after 4 days.
LVL 26

Expert Comment

ID: 12240188
I don't thine there is problem

Now you use DAO instead of ADO

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

715 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