wwUtils::ArrayToCollection

Convert a FoxPro array to a Collection.

Useful in scenarios where you need to return a 'collection' result but you only have access to an array. Arrays can't be passed from methods and don't pass well over COM, so they work badly in multi-tier environments for serialization or for passing to external applications. Collections are more flexible and this function makes it easy to convert arrays to something more usable.

o.ArrayToCollection(@laArray,lnMode)

Return Value

Collection is always returned even if empty. If a non-array is passed an error occurs.

Parameters

@laArray
Array to convert

lnMode
0 - (default) Collection
2 - wwCollection


See also:

Class wwUtils

© West Wind Technologies, 1996-2019 • Updated: 04/08/15
Comment or report problem with topic