Ask a question
Contribute an article
Questions
Articles
Register
Log in
C#
ASP.NET
C/C++
JAVA
Javascript
jQuery
HTML
CSS
SQL
Categories
Programming/Coding
Amazon Web server
ASP.NET
Azure
Bootstrap
C#
C/C++
CSS
HTML
Java
Javascript
Jquery
Mobile developement
Photoshop
PHP
Python
SEO/SMO
SQL
Web api
General
Android
How-To
iOS/iPhone
Technology
Windows/MacOsx
Other
Tools
Minify HTML online
Minify CSS online
Minify JS (Javascript) online
Online HTML formatter (Beautifier)
Online CSS Beautifier
Online JS (Javascript) Formatter
Online XML Formatter
Online SQL formatter
there is error while executing stored procedure
USE [ConsumerBanking]
GO
SET
ANSI_NULLS
ON
GO
SET
QUOTED_IDENTIFIER
ON
GO
CREATE
PROCEDURE
[dbo].[GetCBLoginInfo]
@UserName
VARCHAR
(20),
@
Password
varchar
(20)
AS
SET
NOCOUNT
ON
Declare
@Failedcount
AS
INT
SET
@Failedcount = (
SELECT
LoginFailedCount
from
CBLoginInfo
WHERE
UserName = @UserName)
IF EXISTS(
SELECT
*
FROM
CBLoginInfo
WHERE
UserName = @UserName)
BEGIN
IF EXISTS(
SELECT
*
FROM
CBLoginInfo
WHERE
UserName = @UserName
AND
Password
= @
Password
)
SELECT
'Success'
AS
UserExists
ELSE
Update
CBLoginInfo
set
LoginFailedCount = @Failedcount+1
WHERE
UserName = @UserName
Update
CBLoginInfo
set
LastLoginDate=GETDATE()
WHERE
UserName = @UserName
BEGIN
IF @Failedcount >=5
SELECT
'Maximum Attempt Reached (5 times) .Your Account is locked now.'
AS
UserExists
ELSE
select
CONVERT
(
varchar
(10), (
SELECT
LoginFailedCount
from
CBLoginInfo
WHERE
UserName = @UserName))
AS
UserFailedcount
END
END
ELSE
BEGIN
SELECT
'User Does not Exists'
AS
UserExists
END
Asked by:-
PranaliGholap
0
: 344
At:- 2/29/2020 5:28:48 AM
there is error while executing the stored procedure
also stored procedure not seen in stored procedure
Comment
add comment to question
Login
/
Register
to answer
Or
Post answer directly by entering your email-id & Name
Full Name *
Email *
By posting your answer you agree on
privacy policy
&
terms of use
Subscribe Now
Subscribe to our weekly Newsletter & Keep getting latest article/questions in your inbox weekly
Follow us