0

I have this code so how to get out parameter value here...

string Proc_CreateWorkingSet = "usp_CustomerInfo";

var parameters = new[] {
          new SqlParameter(){ ParameterName="@WorkTableName", Value="WorkingSet" },
          new SqlParameter(){ ParameterName="@ProcessName", Value=Customer.ProcessName },
          new SqlParameter(){ ParameterName="@SettingName", Value="NORTHSHOREMISCFIELD" },                            
          new SqlParameter(){ ParameterName="@ReturnedSQLCmd", Value=string.Empty, Direction=ParameterDirection.Output},
         };

ClientDatabase.ExecuteStoredProcedureNonQuery(Proc_CreateWorkingSet, parameters);
Logger.LogInfo(parameters[3].Value.ToString());
1
  • The problem most probably lies in your customized ExecuteStoredProcedureNonQuery which does something with parameters. No other ideas yet. Commented Jul 1, 2016 at 20:52

1 Answer 1

3

Just use the Value property like below. ToString() returns the parameter name and not value

Logger.LogInfo(parameters[3].Value);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.