Share via


IProfileObject2::get_Fields Property

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

The Fields property is a read-only Fields collection that contains the profile property data for the ProfileObject object. Read-only refers to the inability to add or delete members (profile properties) of the Fields collection. This property is the default property of the ProfileObject object. Use this property to set and retrieve profile property values and to navigate the attribute list of the properties.

HRESULT IProfileObject2::get_Fields(
  Fields** ppFields
);
Property Fields As Object

Parameters

  • ppFields
    [C++]

    [out, retval] The address of a pointer to a Fields collection used to return the profile object properties.

Return Value

[C++]

This method returns an HRESULT indicating whether it completed successfully. See the following Error Values section for more details.

[Visual Basic]

None.

Error Values

The Errors property of the ProfileService object stores the collection of errors encountered in the last Profiles resource operation. For more information, see IProfileService::get_Errors.

Remarks

The Fields collection is similar to an ADO Fields collection object. The following ADO Fields methods and properties are supported:

  • Count

  • Item

  • _NewEnum

A member of the Fields collection is a Field object that represents a single property or property group of a ProfileObject object. The Field object is similar to an ADO Field object. The following ADO Field methods and properties are supported:

  • Properties - Returns the read-only Attributes collection.

  • DefinedSize - Retrieves the defined size of the data type.

  • Name

  • Type

  • Value - When dealing with implementations involving the encryption of profile properties, note that the KeyIndex Field object requires special consideration in that the Value property of this object is read-only. Any assignment to the Value property will result in an error.

The Attributes collection is represented as an ADO Properties object. The following ADO Properties methods and properties are supported:

  • Count

  • Item

  • _NewEnum

Use the Update method of the ProfileObject object to save any changed profile data in the underlying data store.

The Fields property of the ProfileObject object supports extended dot notation for increased performance. For example, using extended dot notation, the following:

oProfileObject.Fields("Address.Zipcode")

is equivalent to:

oProfileObject.Fields("Address").Value("Zipcode")

The ppFields parameter contains valid data only if the property is accessed successfully.

See Also

Other Resources

ProfileObject Object

ProfileService Object