[SCHOOL WORK]
I have a stored procedure:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [IO].[usp_selectUser] (@username varchar(50))
AS
BEGIN
SELECT passwordSalt, hashedPassword
FROM [IO].[Users]
WHERE username = @username;
END
And in my C# program I need to get the passwordSalt
and the hashedPassword
where username matches:
Current C# code:
SqlCommand command = new SqlCommand("[IO].[usp_selectUser]", con);
command.CommandType = CommandType.StoredProcedure;
command.Parameters.Add(new SqlParameter("@username", SqlDbType.VarChar)).Value = username;
I've tried some stuff from Google search results, but none of the worked properly. How do I get two individual strings?