日期:2014-05-17 浏览次数:20567 次
private static SqlCommand Connect(string procedureName, SqlParameter[] parms)
{
//省略部分代码
SqlConnection con = new SqlConnection(conStr);
con.Open();
SqlCommand cmd = new SqlCommand(procedureName, con);
//省略部分代码
return cmd;
}
public int RunProc(string procedureName, SqlParameter[] parms, out DataTable dt)
{
SqlDataAdapter ada = new SqlDataAdapter();
ada.SelectCommand = Connect(procedureName,parms);
//省略部分代码
}