Runtime Error 429, VB6, ActiveX control, Access97 DB

Status
Not open for further replies.

Derek Wildstar

Ars Tribunus Angusticlavius
9,063
Subscriptor
First, in case this sounds familiar, this is NOT the problem I wrote about here: http://episteme.arstechnica.com/eve/forums?a=tpc&s=50009562&f=6330927813&m=7490965024


Here's the basics:

VB6 ActiveX control compiled and packaged for internet distribution.
When the applicable .html file is accessed from a machine which does NOT have VB6 installed, I get Runtime Error 429 ("ActiveX Control Cannot Create Object") IF I install VB6, SOMETHING is changed locally that allows the compiled, distributed version to be correctly run from IE.

I have gone through the dependency list and ensured that all listed files are included with my distribution. MDAC 2.6 SP1 is installed on the target machine. (This may not be true for all machines, but once I figure out the trouble I can update the others as necessary.)

It does successfully load the control and create the only initially visible item, a command button. That command button loads(but does not display) 2 forms, one of those forms calls the sub I pasted from below, then the code for the activex control shows the other form.

acx control loads 2 forms
form1 calls troubled sub (which populates combobox on still invisible form2)
acx control shows form 2 (which, at runtime, shows up after the error with an UNPOPULATED combobox)

I have been off and on troubleshooting this while working on other things, but one thing or another has led me to believe that it is the following block of code which generates the error. Note that it DOES successfully load the forms in question, but fails to populate a combobox on one of the forms which contains the data accessed by the below code. This is the first thing done by the app, and is therefore obviously the first place my code attempts to connect to the db. You'll note that I'm not doing much at this point but creating (then later reading from) a recordset.

There are dozens and dozens of links concerning Runtime error 429 at MSDN and the MSKB, as well as elsewhere. However, having tried many, many solutions I have to conclude that either I am not knowledgeable enough to implement the solutions correctly (Usually I at least know enough to know when I don't know how to do something, so I don't think this is it, but it is possible), OR they do not apply.

This is killing me, and is a large stumbling block in my path. Please, please, please help.

Thanks,
DW



Public Sub logonpop()
Dim rstpeople As ADODB.Recordset, rstaccess As ADODB.Recordset, constr As String, conn As ADODB.Connection
Dim strfirstname() As String, strlastname() As String, intcount As Integer
'Public intTabindex As Integer, strpritext() As String, strcomptext() As String, strLocname() As String


'open conn connection
Set conn = New ADODB.Connection
constr = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=F:\Joe\elogpunch.mdb"
conn.Open constr

'open recordset on tblpersonnel

Set rstpeople = New ADODB.Recordset
rstpeople.CursorType = adOpenKeyset
rstpeople.LockType = adLockOptimistic
rstpeople.Open "tblpersonnel", conn, , , adCmdTable
 

wb

Ars Legatus Legionis
25,208
Subscriptor
Well, the only times (that I know of) that you get 429 are when you call new or CreateObject().

IMHO the fastest way to debug this kind of stuff (assuming you can't interactively debug) is to just put a msgbox right before and after each call to new or createobject, and see where it's puking. This will tell you which object IE can't find, which probably means you're missing that DLL or OCX on the target machine, or at least that the object isn't registered. Remember that even though you might install the DLL or OCX containing said object into the path, you might still have to run regsrvr32 to register it.
 
Status
Not open for further replies.