CREATE PROC dbo.[spx_SvcReq_Login]
SET NOCOUNT ON
If Exists (
Select Top 1 *
From [staff_main] with (nolock)
Where ([email_link] = @email)
SET NOCOUNT OFF
public static void userLoginValidation(string user_email)
SqlConnection SQLConn = new SqlConnection(OrrwebConnectionString());
SqlCommand sqlCmd = new SqlCommand("spx_SvcReq_Login", SQLConn);
sqlCmd.CommandType = CommandType.StoredProcedure;
sqlCmd.Parameters["@email"].Value = user_email;
sqlCmd.Parameters.Add("@retVal", SqlDbType.Int, 0);
catch (Exception objError)
//The next line is pseudo-code...
The problem here is that I'm just learning C#, so there's a lotta things I really don't know. One of those things is syntax, which I'm gradually learning. In ASP classic, I would have no problem obtaining the return value from the sproc, but I'm sorta lost at sea with this one. How do I go about getting the return value from the sproc, so that this function outputs that value for use in my main page code-behind?