GlobalConfig2.MakeStringFromArray Method (PIA)

Use this method to convert a System.Array object into an encoded string, which can be written to the Fields property.

Definition

[Visual Basic .NET]

Imports Microsoft.CommerceServer.Interop.Configuration
…
Public Function MakeStringFromArray(ByRefvarArray As Object) As Object

[C#]

using Microsoft.CommerceServer.Interop.Configuration;
…
public object MakeStringFromArray(ref objectvarArray);

Parameters

[Visual Basic .NET]

  • varArray
    An Object that contains the System.Array to encode.

[C#]

  • varArray
    An object that contains the System.Array to encode.

Return Values

[Visual Basic .NET] If this method completes successfully, it returns an Object that contains the encoded string.

[C#] This method returns an object containing the encoded 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

The Initialize method must be called before this method can be called.

Ee810835.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

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

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

[Visual Basic .NET]

Example

' oEncoded is an Object
' oArray is an Object
' oGlobalConfig is a Commerce GlobalConfig2 object
oEncoded = oGlobalConfig.MakeStringFromArray(oArray)

Requirements

Namespace: Microsoft.CommerceServer.Interop.Configuration

Platforms: Windows 2000, Windows Server 2003

Assembly: CS_MSCSCfg (in cs_mscscfg.dll)

See Also

GlobalConfig2 Class

Copyright © 2005 Microsoft Corporation.
All rights reserved.