Description
Resets per-user state for the specified user and the specified page, by deleting the corresponding record from the aspnet_PersonalizationPerUser table. Can also delete records, based on the user's last activity date if it falls on or before the specified date.
Parameters
| Name |
Type |
Direction |
| @Count |
int |
Input/Output |
| @ApplicationName |
nvarchar |
Input |
| @InactiveSinceDate |
datetime |
Input |
| @UserName |
nvarchar |
Input |
| @Path |
nvarchar |
Input |
Definition
CREATE PROCEDURE dbo.aspnet_PersonalizationAdministration_ResetUserState (
@Count int OUT,
@ApplicationName NVARCHAR(256),
@InactiveSinceDate DATETIME = NULL,
@UserName NVARCHAR(256) = NULL,
@Path NVARCHAR(256) = NULL)
AS
BEGIN
DECLARE @ApplicationId UNIQUEIDENTIFIER
EXEC dbo.aspnet_Personalization_GetApplicationId @ApplicationName, @ApplicationId OUTPUT
IF (@ApplicationId IS NULL)
SELECT @Count = 0
ELSE
BEGIN
DELETE FROM dbo.aspnet_PersonalizationPerUser
WHERE Id IN (SELECT PerUser.Id
FROM dbo.aspnet_PersonalizationPerUser PerUser, dbo.aspnet_Users Users, dbo.aspnet_Paths Paths
WHERE Paths.ApplicationId = @ApplicationId
AND PerUser.UserId = Users.UserId
AND PerUser.PathId = Paths.PathId
AND (@InactiveSinceDate IS NULL OR Users.LastActivityDate <= @InactiveSinceDate)
AND (@UserName IS NULL OR Users.LoweredUserName = LOWER(@UserName))
AND (@Path IS NULL OR Paths.LoweredPath = LOWER(@Path)))
SELECT @Count = @@ROWCOUNT
END
END
ASP.NET 2.0 Provider Database