using (SqlConnection myconn = new SqlConnection(ResConn)) { string userproc = "ISYSUserLookup"; using (SqlCommand rescmd = new SqlCommand(userproc, myconn)) { myconn.Open(); rescmd.Parameters.AddWithValue("@UserID", creds.UserID); // this is the only imput param. SqlParameter PssWord = new SqlParameter("@password", SqlDbType.VarChar, 200); PssWord.Direction = ParameterDirection.Output; rescmd.Parameters.Add(PssWord); SqlParameter SaltVal = new SqlParameter("@Salt", SqlDbType.VarChar, 25); SaltVal.Direction = ParameterDirection.Output; rescmd.Parameters.Add(SaltVal); SqlParameter PRD = new SqlParameter("@PWResetDays", SqlDbType.Int); PRD.Direction = ParameterDirection.Output; rescmd.Parameters.Add(PRD); SqlParameter AC = new SqlParameter("@AccessLevel", SqlDbType.Int); AC.Direction = ParameterDirection.Output; rescmd.Parameters.Add(AC); SqlParameter Deact = new SqlParameter("@Deact", SqlDbType.Int); Deact.Direction = ParameterDirection.Output; rescmd.Parameters.Add(Deact); int GetCreds = rescmd.ExecuteNonQuery(); myconn.Close();At the ExecuteNonQuery, I get "stored proc ProcName is expected the parameter @UserID which was not supplied"
** by the by, this is the parameter block for the stored proc ALTER PROCEDURE [dbo].[ISYSUserLookup] @UserID varchar(50), @password varchar(200) output, @Salt varchar(25) output, @PWResetDays int output, @AccessLevel int output, @Deact int output asWhen stepping through the code, VS tells me that yes, @UserID is the first item in the parameter array and it even has the value for it, so I know it's getting that far.