Get the Return Value from an SQL Stored Procedure


/ Published in: C#
Save to your folder(s)



Copy this code and paste it in your HTML
  1. parameters[1] = new SqlParameter("@Return_Value", SqlDbType.Int);
  2. parameters[1].Value = -1;
  3. parameters[1].Direction = ParameterDirection.ReturnValue;
  4.  
  5. if(Int32.Parse(parameters[1].Value.ToString()) != -1)
  6. {
  7. //Success
  8. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.