SiteConfig.GetIfCollection

Ee797224.c++_on(en-US,CS.10).gifEe797224.vb_off(en-US,CS.10).gif

Use this method to convert values read from the Fields property into the appropriate object such as a SimpleList object or VariantArray.

Definition

Function GetIfCollection(strList As Variant) As Variant

Parameters

strList

A Variant that contains the encoded string to be converted.

Return Values

If this method completes successfully, it returns a Variant containing the converted data in the appropriate data type.

Error Values

This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to standard COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.

All ADO, SQL, and ODBC errors will also be returned by this method.

Remarks

If the encoding in the string contained in the Fields property indicates a SimpleList object, then a SimpleList object is returned. If the encoding indicates a VariantArray, then a VariantArray is returned. If no collection object is indicated, then the method returns the original encoded input string.

For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.

Example

' vVariant is a Variant; vEncodedString is a Variant
' oSiteConfig is a Commerce SiteConfig object
vVariant = oSiteConfig.GetIfCollection(vEncodedString)

See Also

SiteConfig Object


All rights reserved.