System.Web.Profile.SqlProfileProvider.DeleteProfiles Method

Deletes profile properties and information from the data source for the supplied list of user names.

Syntax

public override int DeleteProfiles (string[] usernames)

Parameters

usernames
A string array of user names for profiles to be deleted.

Returns

The number of profiles deleted from the data source.

Remarks

The SqlProfileProvider.DeleteProfiles(String[]) method deletes all profile information and properties for the specified profiles from the data source for the application specified by the applicationName attribute in the configuration file. The list of profiles to delete is specified as a string array of user names. If profile properties and information exist in the data source for a user name in the usernames parameter, they are deleted.

The return value may differ from the length of the specified array of usernames. This indicates that some of the profiles in the specified array of usernames were already deleted from the data store.

The database updates that are performed during the call to the SqlProfileProvider.DeleteProfiles(String[]) method are made within a transaction. If an error is encountered, the transaction is rolled back and no updates are performed.

Requirements

Namespace: System.Web.Profile
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0