Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MDAC 2.8/XP SP2/Error 429

Status
Not open for further replies.

DigitalScream

Programmer
Apr 8, 2005
1
CA
I am having a very difficult time finding any solution to a rather specific problem.

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
adoCn.Open

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!

Luke
 
Try uninstalling MDAC first, then re-installing it, otherwise I would recommend rebuilding the machine it isn't working on.
 
When you say that you "installed" it do you mean that you used the Package & Deployment wizard to create a setup program that includes all the dependancies?
 
Check under:

Visual Basic Documentation
Using Visual Basic
Component Tools Guide
Creating ActiveX Components


Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top