下面一段执行存储过程的代码; public int RunProc(string procName, SqlParameter[] prams)
{
SqlCommand cmd = CreateCommand(procName, prams);
try
{
cmd.ExecuteNonQuery();
}
catch(Exception ex)
{
SystemError.SystemLog(ex.Message);
}
Close();
return (int)cmd.Parameters["ReturnValue"].Value;
}
请问:
return (int)cmd.Parameters["ReturnValue"].Value;
这句话起什么作用?
{
SqlCommand cmd = CreateCommand(procName, prams);
try
{
cmd.ExecuteNonQuery();
}
catch(Exception ex)
{
SystemError.SystemLog(ex.Message);
}
Close();
return (int)cmd.Parameters["ReturnValue"].Value;
}
请问:
return (int)cmd.Parameters["ReturnValue"].Value;
这句话起什么作用?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货