Jump to content
Xtreme .Net Talk

Using VB6 Collection objects in VB.NET


Recommended Posts

Guest ThePinkPanther
Posted

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...