Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention. Check out this how-to article for more information.
Here is my code-behind that is calling the storedproc, but not sure what needs to be modified to receive a value back... Using conn As New SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings("WebConnectionString").ConnectionString) Dim cmd As New SqlCommand("Approved_User", conn) cmd.Parameters.Add(New SqlParameter("@Login", SqlDbType.VarChar, 20)) cmd.Parameters("@Login").Value = hdnUser.Value 'questionable area.... Dim paramReturnValue As New SqlParameter() paramReturnValue.ParameterName = "@return_value" paramReturnValue.SqlDbType = SqlDbType.Int paramReturnValue.Direction = ParameterDirection.ReturnValue conn.Open() cmd.CommandType = CommandType.StoredProcedure cmd.CommandTimeout = 300 cmd.ExecuteNonQuery() cmd.Dispose() conn.Close() conn.Dispose() 'Return End Using Here is my SQL, again not sure what I need to change to get it to send a value back once it has been called, I need something like the following, I am trying to see if a person is on a list of approved users and return a 1 if they are or a 0 if they are not. ALTER PROCEDURE [dbo].[ApprovedUser] ( @Login varchar(50) ) AS DECLARE @rc Int SELECT distinct Security_User.USERID FROM Security_User inner join UserBranch on Security_User.UserID = UserBranch.UserID inner join UserInfo on Security_User.UserID = UserInfo.UserID inner join Security_User_Role on Security_User.UserID = Security_User_Role.UserID WHERE Login = @Login and IsActive = 1 and (BranchRoleCode in (Select distinct BranchRoleCode from BranchRole) or IsGlobalOverrider = 1 or RoleID = 1) IF @@RowCount > 0 BEGIN SELECT @rc = 1 RETURN @rc END ELSE BEGIN SELECT @rc = 0 RETURN @rc END