I have a stored procedure (show below) that I need to return a few of
the fields. Its just a basic login, nothing high security. I can't
figure out how to get it to return the fields I require. Any
assistance? (I'm using C# and SQL Express 2008).
Kind regards.
Thanks!
ALTER PROCEDURE [dbo].[auth]
-- Add the parameters for the stored procedure here
(
@user varchar output,
@password varchar output
)
AS
DECLARE
@id int,
@pos varchar
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
SELECT PersonID, Rank, Position, Supervisor FROM PERSON WHERE
UserName = @user AND Password = @password
END