M
Mango
HI friends,
I've got one question. When I realize "log in" in my sql server, I am using
SP like this:
CREATE Procedure CustomerLogin
(
@Email nvarchar(30),
@Pwd nvarchar(10),
@CustomerID int OUTPUT
)
AS
SELECT
@CustomerID = CustomerID
FROM
Customers
WHERE
Email = @Email COLLATE SQL_Latin1_General_CP1_CS_AS
AND
Pwd =@Pwd COLLATE SQL_Latin1_General_CP1_CS_AS
IF @@Rowcount < 1
SELECT
@CustomerID = 0
GO
The problem is that if the password is "qweqwe" and I try to log in with
"qweqwe " or even "qweqwe " (I mean with space after last symbol) it
succeed!!!
Interesting but if I try to log in with " qweqwe" (I mean with space in
beginning) it not succeed.
I don't know why. Could you please somebody help me?
I've got one question. When I realize "log in" in my sql server, I am using
SP like this:
CREATE Procedure CustomerLogin
(
@Email nvarchar(30),
@Pwd nvarchar(10),
@CustomerID int OUTPUT
)
AS
SELECT
@CustomerID = CustomerID
FROM
Customers
WHERE
Email = @Email COLLATE SQL_Latin1_General_CP1_CS_AS
AND
Pwd =@Pwd COLLATE SQL_Latin1_General_CP1_CS_AS
IF @@Rowcount < 1
SELECT
@CustomerID = 0
GO
The problem is that if the password is "qweqwe" and I try to log in with
"qweqwe " or even "qweqwe " (I mean with space after last symbol) it
succeed!!!
Interesting but if I try to log in with " qweqwe" (I mean with space in
beginning) it not succeed.
I don't know why. Could you please somebody help me?