ProfileService.DeleteProfile

Ee798366.c++_on(en-US,CS.10).gifEe798366.vb_off(en-US,CS.10).gif

Use this method to delete the ProfileObject object specified by a primary key value and schema type. All properties associated with the profile are purged from the system.

Definition

Sub DeleteProfile(sValue As Variant,strType As String)

Parameters

sValue

[in] A Variant that contains the primary key value.

strType

[in] A String that contains the profile schema type.

Return Values

None.

Error Values

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

Remarks

If the DeleteProfile method is called because of an error in creating a new ProfileObject object, any error message produced should be ignored.

Use the DeleteProfileByKey method to delete a profile specified by a key member/value pair and schema type.

Call the Initialize method before you use this ProfileService method.

Ee798366.caution(en-US,CS.10).gif Caution

  • Care must be taken when deleting ProfileObject objects due to possible expression dependencies. See the ExpressionStore and ExpressionEval objects for details on expressions.

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

Example

' oProfileService is a Commerce ProfileService object

oProfileService.DeleteProfile("Joeuser@microsoft.com", "UserObject")

See Also

ProfileService Object

ProfileService.CreateProfile

ProfileService.DeleteProfileByKey

ExpressionEval Object

ExpressionStore Object


All rights reserved.