Guest ThePinkPanther Posted December 2, 2002 Posted December 2, 2002 I am currently developing an application which uses a third party COM component (written in VB6). The example code in the Third Party documentation states: Dim oSession as ISession Dim oDatabase as IDatabase Set oSession = Connection.Database For Each oDatabase in oSession ... Next However, the oSession which is returned by the Com object is IObject and I get an exception if I try to cast the object to a Collection using CType. Has anyone come across this before? I've been scouring google and newsgroups all morning but have been unable to unearth anything. Quote
*Gurus* Derek Stone Posted December 2, 2002 *Gurus* Posted December 2, 2002 You can't cast a VB6 Collection object into a .NET collection object. It just doesn't work that way. Two entirely different types. Quote Posting Guidelines
Recommended Posts