Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8705025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:15:08+00:00 2026-06-13T03:15:08+00:00

I have created one sql procedure to return password associated with user name. SQL

  • 0

I have created one sql procedure to return password associated with user name.

SQL Procdure:

USE [C:\INETPUB\WWWROOT\ADDMARKER\MAP\MAP\APP_DATA\ASPNETDB.MDF]
GO
/****** Object:  StoredProcedure [dbo].[aspnet_Membership_EmailPassword]    Script Date: 10/18/2012 15:32:02 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:      <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
ALTER PROCEDURE [dbo].[aspnet_Membership_EmailPassword] 
    -- Add the parameters for the stored procedure here
            (
            @UserName  nvarchar(256),
            @PasswordReturn nvarchar(128) out
            )
AS
BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
     DECLARE @UserId                                 uniqueidentifier
     DECLARE @Password                               nvarchar(128)
     DECLARE @Return_Password                         nvarchar(256)
     DECLARE @IsLockedOut                            bit
     DECLARE @ErrorCode     int
     SET @ErrorCode = 0

     DECLARE @TranStarted   bit
     SET @TranStarted = 0
      SET NOCOUNT ON;

IF( @@TRANCOUNT = 0 )
    BEGIN
        BEGIN TRANSACTION
        SET @TranStarted = 1
    END
    ELSE
        SET @TranStarted = 0

    SELECT  @UserId = u.UserId,
            @Password = m.Password,
            @IsLockedOut = m.IsLockedOut

    FROM    dbo.aspnet_Users u, dbo.aspnet_Membership m WITH ( UPDLOCK )
    WHERE    u.UserId = m.UserId AND
            LOWER(@UserName) = u.LoweredUserName

     IF ( @@rowcount = 0 )
    BEGIN
        SET @ErrorCode = 1
    END

    IF( @IsLockedOut = 1 )
    BEGIN
        SET @ErrorCode = 99
    END
    IF(Not( @ErrorCode = 0) )
    set @PasswordReturn = 'Error in search'
       ELSE
       set @PasswordReturn = @Password
       RETURN @PasswordReturn
END

I am getting error

“Msg 245, Level 16, State 1, Procedure aspnet_Membership_EmailPassword, Line 59
Conversion failed when converting the nvarchar value ‘egt1egt’ to data type int.”

On execution of that procedure.

Please can any one help?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T03:15:09+00:00Added an answer on June 13, 2026 at 3:15 am

    Return can only return an int which is the return value of the procedure.

    The output parameter will be automatically returned when you exit the procedure, so remove the line

     RETURN @PasswordReturn 
    

    See http://msdn.microsoft.com/en-us/library/59x02y99(v=vs.71).aspx for a detailed explanation of the difference between output parameters and the return value

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created one user named tuser with create database rights in SQL server
I have created a SQL Server 2000 stored procedure to return some XML data
I have one SQL server database which was created using Import/Export Wizard from an
i have created one login and register view in that view after login user
I have a stored procedure that needs to return something from one of two
I have created small test web application which makes use of LINQ to SQL.
I have created one stored procedure which runs on 5000 users in tbluser table
I have created one stored procedure and its functioning well, what I am wanting
I have created one service in my grails application. in that service 25 methods
I have created one UIImageView Here's code capView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:kARROW_CAP_NAME]]; capView.frame

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.