LoadFromString Method (NamedValues collection)

             

 

Loads a NamedValues collection from a string.

 

Syntax

object.LoadFromString source

The LoadFromString method syntax has these parts:

Part

Description

object

An object expression that evaluates to an object in the Applies To list.

source

A string expression, as described in Settings. The source string is parsed and each NamedValue pair it contains is added to the collection.

 

Settings

The format of source is:

 name [= value] {; name [= value] } [;]

Name-value pairs are separated by semicolons. Optionally, there may be a semicolon at the end of the string. Within a pair, the name is separated from the value by an equal sign. If the equal sign is omitted, the value is set to an empty string.

Leading and trailing blanks are stripped from both name and value.

 

Remarks

If source is empty, it is an error.

All NamedValue objects loaded with this method will have string-type values. No attempt is made to convert strings into other data types, such as numbers and times.

 

Trappable Errors

In addition to generic errors (such as Out of Memory), the following errors may occur:

Error

Description

pseACCESSDENIED

The collection cannot be modified because it is frozen; that is, the collection's ReadOnly flag is true.

pseDUPLICATENAME

The string contains one or more NamedValue pairs with the same names as members of this collection.

Enabling Operational Intelligence