如题,对这个不熟悉,麻烦各位指点下
谢谢啦

解决方案 »

  1.   

    public bool Add(string 参数1 ...)//传你自己的参数
            {
                //定义你直接的Connection
                try
                {
                    SqlCommand sqlCommand = new SqlCommand("你的存储过程名", Connection);
                    sqlCommand.CommandType = CommandType.StoredProcedure;
                    //打开Connection                sqlCommand.Parameters.AddWithValue("@参数1", 值1);//@参数1   存储过程参数
                    sqlCommand.Parameters.AddWithValue("@参数2", 值2);
                    sqlCommand.Parameters.AddWithValue("@参数3", 值3);                sqlCommand.ExecuteNonQuery();                return true;
                }
                catch (Exception ex)
                {
                    GC.Collect();
                    return false;
                }
                finally
                {
                    //关闭Connection         
                }
            }
      

  2.   

    还有获取 返回值
    存储中的OUTPUT值