您的位置:首页 > 数据库

使用sqlhelper类实现接收存储过程返回的值

2012-04-21 10:29 239 查看
SqlParameter[] parameters = {
new SqlParameter("@dh", SqlDbType.VarChar),
new SqlParameter("@RETURN_VALUE",SqlDbType.VarChar)
};
parameters[0].Value = textBox1.Text;
parameters[1].Direction = ParameterDirection.ReturnValue;//返回值
SqlHelper.ExecuteNonQuery(CommandType.StoredProcedure, "PR_update_sw01_bj", parameters);
string a = parameters[1].Value.ToString();
if (a == "-1")
{

MessageBox.Show("有运单数量和实收数量不一至!");

}
else
{
MessageBox.Show("此单完结!");
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐