P
philip
hello, i am new to asp.net and sql server, and i have 3 questions for
asking:
1. i am writing a store procedure of login validation for my asp.net
application and wondering what the different between RETURN and SELECT
is.
if exists(select * from users where username = @username and password =
@password)
BEGIN
SELECT 1
RETURN 1
END
ELSE
BEGIN
SELECT 0
RETURN 0
END
2. if i use SqlCommand object's ExecuteScalar() method to get the
stored procedure result, which return value will i get? SELECT value or
RETURN value? is it a usual way for getting a return value by using
ExecuteScalar()?
3. how can i implement a case sensitve validation?
asking:
1. i am writing a store procedure of login validation for my asp.net
application and wondering what the different between RETURN and SELECT
is.
if exists(select * from users where username = @username and password =
@password)
BEGIN
SELECT 1
RETURN 1
END
ELSE
BEGIN
SELECT 0
RETURN 0
END
2. if i use SqlCommand object's ExecuteScalar() method to get the
stored procedure result, which return value will i get? SELECT value or
RETURN value? is it a usual way for getting a return value by using
ExecuteScalar()?
3. how can i implement a case sensitve validation?