PDA

Click to See Complete Forum and Search --> : RunTime Error 429 - ActiveX Component cant create object


TonyJ
Oct 14th, 1999, 05:44 AM
I keep getting this error when I run my code when I get to the Set ws line (or if this is ommited) the set mydb line.

the same code works if i set the dao properties to point to my database and an associate textbox contains data from the database !

ive tried reinstalling access and vb5

HELP !!

Private Sub FindTables()
Dim rs As Recordset
Dim Mydb As Database
Dim tbl As TableDef
Dim temp As String
Dim ws As Workspace

temp = Space(100)

temp = txtDatabase.Text
dataDatabase.DatabaseName = temp

Set ws = DBEngine.Workspaces(0)
Set Mydb = ws.OpenDatabase(temp)

For Each tbl In Mydb.TableDefs
lstTables.AddItem tbl.Name
Next tbl

End Sub

DGilbert
Oct 14th, 1999, 06:46 AM
TonyJ,
In my experience this error occurred when the active x reference msado15.dll was missing or not pathed correctly. Check references, location and registry. mdac_type.dll puts it in program files\common files\system\ado I believe.

All the best

Clunietp
Oct 14th, 1999, 08:58 AM
try running

regsvr32.exe "c:\program files\common files\microsoft shared\dao\dao350.dll"
to register the DAO library.

I ran your code and it was fine.....??

sorry

Tom

murdoc
Oct 15th, 1999, 12:41 AM
I'm running into the same issue except mine is a little more complex, maybe. I have no idea where in the code this is happening. I have an MDI form with a sheridan tool on it. When I replace this form with another nonMDI form, it works fine. This MDI form is linked to about 10 form files and 10 control files plus 6 DLL projects. It's a large project. I've also notice that when tweeking with the code I get the MSComctrlib object to disappear and tell me that it's a non defined user type.

Anyone have any kind of solution? This all started happening when I ran an installation of the project on my machine.

TonyJJ
Oct 18th, 1999, 05:17 AM
got the same error message myself using VB6 yesterday. I was trying to use RDO however, which I realised could only be used with the Enterprise edition. Your code does not indicate that you are using RDO but the run time error does occur under these circumstances.

JHausmann
Oct 18th, 1999, 05:46 AM
In place of:

Set ws = DBEngine.Workspaces(0)
Set Mydb = ws.OpenDatabase(temp)


I'd usually use:

Set Mydb= Workspaces(0).OpenDatabase(temp)