text: ﻿CREATE PROCEDURE [dbo].[aspnet_Membership_SetPassword]
      @ApplicationName  nvarchar(256),
      @UserName         nvarchar(256),
      @NewPassword      nvarchar(128),
      @PasswordSalt     nvarchar(128),
      @CurrentTimeUtc   datetime,
      @PasswordFormat   int = 0
  AS
  BEGIN
      DECLARE @UserId uniqueidentifier
      SELECT  @UserId = NULL
      SELECT  @UserId = u.UserId
      FROM    dbo.aspnet_Users u, dbo.aspnet_Applications a, dbo.aspnet_Membership m
      WHERE   LoweredUserName = LOWER(@UserName) AND
              u.ApplicationId = a.ApplicationId  AND
              LOWER(@ApplicationName) = a.LoweredApplicationName AND
              u.UserId = m.UserId
  
      IF (@UserId IS NULL)
          RETURN(1)
  
      UPDATE dbo.aspnet_Membership
      SET Password = @NewPassword, PasswordFormat = @PasswordFormat, PasswordSalt = @PasswordSalt,
          LastPasswordChangedDate = @CurrentTimeUtc
      WHERE @UserId = UserId
      RETURN(0)
  END
  
  