IProfileObject2::get_Fields Property[C++]

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.

Definition

[C++]

HRESULT IProfileObject2::get_Fields(Fields**ppFields);

[Visual Basic]

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.

[Visual Basic] None.

[C++]

Return Values

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

Error Values

[C++] 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.

[Visual Basic] The Errors property of the ProfileService object stores the collection of errors encountered in the last Profiles resource operation. For more information, see ProfileService.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 KeyIndexField 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")

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

[C++]

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

See Also

[C++]ProfileObject Object

[C++]ProfileService Object

[Visual Basic]ProfileObject Object

[Visual Basic]ProfileService Object

Copyright © 2005 Microsoft Corporation.
All rights reserved.