"bad variable type" when getting resource item from gallery
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Content Management Server > "bad variable type" when getting resource item from gallery




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    "bad variable type" when getting resource item from gallery  
geronimo


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-23-04 02:18 PM

Hi,

When I loop through a resource gallery and try to get the resources in it, I
get a strange error:

[COMException (0x80020008): Bad variable type.]

Microsoft.ContentManagement.Interop.Publishing.IRcwResources.get_Item(Object
index) +0
Microsoft.ContentManagement.Publishing.ResourceCollection.get_Item(Int32
index) +60

[CmsServerException: Bad variable type.]
Microsoft.ContentManagement.Publishing.ResourceCollection.get_Item(Int32
index) +90

the code looks like this;

[start snippet]
Dim rGallery As ResourceGallery
Dim mCol As ResourceCollection
Dim theResource As Resource
Dim i As Integer

'...get the resource gallery

If Not rGallery Is Nothing Then
mCol = rGallery.Resources
For i = 0 To mCol.Count - 1
theResource = mCol.Item(i) 'error!!
Next i
End If
[end snippet]

I get the error on the mCol.getItem(i) statement
Shouldn't this work like that? Or am I doing something wrong here?

Env: Win2k3, MCms2002sp1a

Geronimo






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 11:56 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register