Calling MSSQL's aspnet_Membership_CreateUser stored procedure

Here's how you would want to call mssql's aspnet_Membership_CreateUser method:
DECLARE @return_value int,
  @UserId uniqueidentifier,
  @nowUtc datetime,
  @now datetime
  
set @nowUtc = getutcdate() 
set @now = getdate()

EXEC @return_value = [dbo].[aspnet_Membership_CreateUser]
  @ApplicationName = N'myApp',
  @UserName = N'myUserName',
  @Password = N'GnVHaGINqzkX14MAjYFNS8eIj1M=',
  @PasswordSalt = N'BdR75cxL6c4sTWaDq+AuVw==',
  @Email = N'myEmail',
  @PasswordQuestion = N'secretQuestion',
  @PasswordAnswer = N'secretAnswer',
  @IsApproved = false,
  @CurrentTimeUtc = @nowUtc,
  @CreateDate = @now,
  @UniqueEmail = 1,
  @PasswordFormat = 1,
  @UserId = @UserId OUTPUT

SELECT @UserId as N'@UserId'

SELECT 'Return Value' = @return_value

GO

Calling MSSQL's aspnet_Membership_CreateUser stored procedure Calling MSSQL's aspnet_Membership_CreateUser stored procedure Reviewed by Edward Legaspi on Saturday, December 17, 2011 Rating: 5

1 comment:

Kevin Efune said...

You're awesome! Exactly what I was looking for. Thank you!

Powered by Blogger.