T
ThePinkPanther
Guest
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? Ive been scouring google and newsgroups all morning but have been unable to unearth anything.
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? Ive been scouring google and newsgroups all morning but have been unable to unearth anything.