ProfileContext.CreateProfile (String, String) Method (BCL)
Use this method to create a new profile object instance with the specified primary key value (as an integer) and profile definition.
[Visual Basic .NET]
Public Function CreateProfile( _ByValkeyValue As System.String, _
ByValprofileType As System.String _
) As Profile
[C#]
public Profile CreateProfile(System.StringkeyValue,
System.StringprofileType);
Parameters
[Visual Basic .NET]
- keyValue
The string value of the primary key property. - profileType
The string profile definition of interest, for example, "UserObject", or "Organization".
[C#]
- keyValue
The string value of the primary key property. - profileType
The string profile definition of interest, for example, "UserObject", or "Organization".
Return Value
A handle to a newly created profile object.
Remarks
For more information about profile programming concepts, see Profile Programming Concepts .
This method throws a CommerceProfileAlreadyExistsException exception if a profile instance with the specified primary key already exists. Note that this method only checks the local profile cache for existence of a profile with the provided key. The physical profile store is not checked until the Update method is called to commit the new profile instance to the store. For any other failure, it throws a CommerceProfileSystemException exception that wraps an inner COMException exception that contains an error code and description describing in more detail the nature of the failure.
Requirements
Namespace: Microsoft.CommerceServer.Runtime.Profiles
Platforms: Windows 2000, Windows Server 2003
Assembly: Microsoft.CommerceServer.Runtime.dll
See Also
Code to Create and Set Profile Properties
Code to Retrieve and Display Profile Properties
Code to Use the SiteTerm Class
Copyright © 2005 Microsoft Corporation.
All rights reserved.