MS的SQLHelper中如何得到存储过程的输出参数值

存储过程

create proc test4
@res varchar(10) output
as
select @res=count(*) from Ship_TUser_Info
go

cs文件:

SqlParameter[] paras = new SqlParameter[] { new SqlParameter("@res", SqlDbType.Int) };
         paras[0].Direction = ParameterDirection.Output;
         SqlHelper.ExecuteNonQuery(SqlHelper.ConnectionStringLocalTransaction, CommandType.StoredProcedure, "test4", paras);
         Response.Write(paras[0].Value.ToString());

你可能感兴趣的:(存储过程)