SiteConfigReadOnly.MakeArrayFromString Method (PIA)

Use this method to convert an encoded string read from the Fields property into a System.Array. If the encoded string does not indicate System.Array properties, then the method returns the original string that was passed into it.

Definition

[Visual Basic .NET]

Imports Microsoft.CommerceServer.Interop.Configuration
…
Public Function MakeArrayFromString(strList As Object) As Object

[C#]

using Microsoft.CommerceServer.Interop.Configuration;
…
object MakeArrayFromString(objectstrList);

Parameters

[Visual Basic .NET]

  • strList
    An Object that contains the encoded string.

[C#]

  • strList
    An object that contains the encoded string.

Return Values

[Visual Basic .NET] If this method completes successfully, it returns an Object that contains the converted System.Array or unconverted String.

[C#] This method returns an object used to return the converted System.Array or unconverted string.

Exceptions

This method may throw one of many mapped exceptions or an exception of type COMException. See Standard COM Errors for additional details.

Remarks

Ee799889.important(en-US,CS.20).gif Important

  • There is a special group of methods used with multi-valued arrays. These methods are the only approved and recommended way of storing and retrieving multi-valued arrays in the Administration database. You must use the following methods with any property that has the structure of a multi-valued array:
    • MakeArrayFromSimpleList
    • MakeSimpleListFromArray
    • MakeArrayFromString
    • MakeStringFromArray

Ee799889.note(en-US,CS.20).gif Note

  • This method can only be used on values exposed by the Fields object. The client-side disconnected ADO recordset has no support for arrays or objects as Fields columns. Therefore, the SiteConfigReadOnly object resorts to storing data in an encoded string format.

[Visual Basic .NET]

Example

' oEncoded is an Object containing an encoded string 
‘ read from the Fields property
' oArray is an Object
' oSiteConfigReadOnly is a Commerce SiteConfigReadOnly object
oArray = oSiteConfigReadOnly.MakeArrayFromString(oEncoded)

Requirements

Namespace: Microsoft.CommerceServer.Interop.Configuration

Platforms: Windows 2000, Windows Server 2003

Assembly: cs_mscscfg (cs_mscscfg)

See Also

SiteConfigReadOnly Class

Copyright © 2005 Microsoft Corporation.
All rights reserved.