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

Posted on 2004-10-05
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
  • 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 ?

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.


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 500 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

821 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