Inside the fuction of the VB 6 code a public collection is being returned to me with an array stored in the collection.
Function Deals()
Dim colFrecFlds as New Collection
Dim arrFrecFlds()
The array is populated with data then:
colFrecFlds.Add(arrFrecFlds)
End Function
My problem in VB.net is that I do not know how to retrieve the array from the collection.
colFrecFlds = oSendOrder.FrecFlds - is returned as VBA.CollectionClass
Dim oSendOrder As CommOrders_T1118a.clsSendOrder = New CommOrders_T1118a.clsSendOrder
objSendRet = oSendOrder.FreightDeal(strCompany, intOrderNo, "TNG", "D")
If objSendRet Is Nothing Then
clsUtil.ErrorOutput("DealReview - GetDeals - ", oSendOrder.strErrMsg)
Return bolSendRet
Exit Function
Else
Dim colFrecFlds As VBA.Collection
Dim arr As Array
'find the return count from the collection - count returned is 1
Dim cnt As Integer = colFrecFlds.Count()
colDrecFlds = oSendOrder.DrecFlds
arr = colFrecFlds.Item("arrFrecFlds")
End If
End If
Any help would be greatly appreciated. Please let me know if I can provide more information to you. Thank you in advance.
smolinitek
Member
9 Points
3 Posts
VB6 to .Net 2.0 - returned collection with array stored inside problem
Jul 19, 2006 01:59 PM|LINK
VB 6 Code:
Inside the fuction of the VB 6 code a public collection is being returned to me with an array stored in the collection.
My problem in VB.net is that I do not know how to retrieve the array from the collection.
colFrecFlds = oSendOrder.FrecFlds - is returned as VBA.CollectionClass
colDrecFlds = oSendOrder.DrecFlds arr = colFrecFlds.Item("arrFrecFlds") End If End IfAny help would be greatly appreciated. Please let me know if I can provide more information to you. Thank you in advance.