日期:2014-05-17 浏览次数:20822 次
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;
}
public void RunProc(string procName, out SqlDataReader dataReader)
{
SqlCommand cmd = CreateCommand(procName, null);
dataReader = cmd.ExecuteReader(CommandBehavior.CloseConnection);
}
public void RunProc(string procName, SqlParameter[] prams, out SqlDataReader dataReader)
{
SqlCommand cmd = CreateCommand(procName, prams);
dataReader = cmd.ExecuteReader(CommandBehavior.CloseConnection);
}