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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OLE Runtime error '-2147221163'

Status
Not open for further replies.

UdoScheuvens

Programmer
Apr 12, 2001
42
DE
Hello,

I have a problem with an ActiveX component I created by myself. A customer told me that he got a

Runtime error '430'
Class doesn't support OLE automation


when he tried to start a program that uses this component.
Detailed diagnosis showed that the entries in the "Interface"-Folder of the RegistryKey HKEY_CLASSES_ROOT were gone (I cannot say whether this was the only damage or how it was created). And they couldn't be recovered by once again registering the component.

So I deleted all the classes of this component as well as the corresponding entries from the "CLSID" and "TypeLib"- folders from HKEY_CLASSES_ROOT.

Afterwards I registered the component again and all entries (including those from the folder "Interface") reappeared. Even a comparison to the same entries of a second PC showed no differences.

When I now start the program that uses this component, I get a

Runtime error '-2147221163 (80040155)'
OLE Automation error


It seems is if this problem only occurs on Win98 or ME, but not on Win95. But I didn't find a way to reproduce it constantly.

Does anybody have an idea what happened to the registry (or whatever) of this particular PC and how to get rid of this problem?

Udo Scheuvens
 
sounds familiar to me.. There can be tons of reasons for that.. but for my case... is usually due to the GUID pointing to a old version of the same component during compilation.. check you program, rereference all the references to the components and try compiling again.

hope it helps
 
i have tried to use two datalists to show two fields from two relevant tables. that is:
use datalist1 show field1 from table1(bounded to adodc1)
use datalist2 show field2 from table2(bounded to adodc2)
field3 from table1 have the relation to field4 from table2(when the database designed,they have not use the same field name, otherwise i can bound the related field directly to the datalist2)
my purpose is: when i change the field1, the field2 is also changed.

my code in the datalist1_click() is
...
tmpstr="select field2 from table2 where field4=(select field3 from table1 where field1='" & datalist1.boundtext & "')"
with adodc2
.recordsourse=tmpstr
.refresh
end with
...

but when i run it,error appeared:
function 'iadodc' of object 'refresh' failed

how can i settle the problem? how to refresh them?

but when i changed adodc2 to data2, datalist2 to dblist2. i succeded! why?

what is the diffrence between datalist and dblist?

 
Richie,

your idea sounds good and I have worked a little bit on this. I verified that all used modules have the same version as on a system where it works, but the error is still there.

There is one thing that I found in addition to what I described before:

The attempt to unregister the component (using the command argument "/UNREGSERVER") causes the error message

Object server not correctly registered

Any more ideas?
 
Well, we could try to unreg it "by hand".
I mean, search entries in the registry where component values are located and delete those entries.
It's kinda Brute-force but if regsvr32 isn't help you...
 
I also tried already the "unreg by hand" (see initial post) but it doesn't solve the problem. The strange thing with this error message is, that nevertheless one class of this component was removed from the registry.

While the component contains 5 classes, the sixth attempt to unreg is error free!

And now?
 
UdoScheuvens, have you tried using RegClean to clean up the registry since your machine's registry is pretty much messed up now? I don't know if that would help much, but at least you keep a program to do the registry clean up for you.

Good luck.

mkuan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top