ProfileService.DeleteProfileByKey Method (PIA)
Use this method to delete the ProfileObject object specified by a key member name/value pair and schema type. All properties associated with the profile are purged from the system.
Definition
[Visual Basic .NET]
Imports Microsoft.CommerceServer.Interop.Profiles
…
Public Sub DeleteProfileByKey(strKeyMemberName As String,
sValueAs Object,
strType As String)
[C#]
using Microsoft.CommerceServer.Interop.Profiles;
…
public void DeleteProfileByKey(stringbstrKeyMemberName,
objectsValue,
stringbstrType);
Parameters
[Visual Basic .NET]
- strKeyMemberName
A String that contains the key member name. - sValue
An Object that contains the key value. The variable types permitted for this object are String or Integer. - strType
A String that contains the profile schema type.
[C#]
- bstrKeyMemberName
A string that contains the key member name. - sValue
An object that contains the key value. The variable types permitted for this object are string or int. - bstrType
A string that contains the profile schema type.
Exceptions
This method may throw one of many mapped exceptions or an exception of type COMException. See Standard COM Errors for additional details.
The Errors property stores the collection of errors encountered in the last Profiles resource operation if an exception is thrown. For more information, see ProfileService.Errors.
Remarks
Use the DeleteProfile method to delete a profile by specifying a primary key value and schema type.
Call the Initialize method before you use this ProfileService method.
Caution
- Care must be taken when deleting ProfileObject objects due to possible expression dependencies. See the ExpressionStore and ExpressionEval objects for details about expressions.
[Visual Basic .NET]
Example
' oProfileService is a Commerce ProfileService object
oProfileService.DeleteProfileByKey("user_id",_
"{74A38551-D6D8-FFD0-12BF-0A20C90DC8D1}" "UserObject")
Requirements
Namespace: Microsoft.CommerceServer.Interop.Profiles
Platforms: Windows 2000, Windows Server 2003
Assembly: mscsupslib (in mscsupslib.dll)
See Also
Copyright © 2005 Microsoft Corporation.
All rights reserved.