存储过程的参数如何传递?

解决方案 »

  1.   

    参数就是和普通的存储过程的传参一样呀。。
    SqlCommand command = new SqlCommand("存储过程",connection);
    command.CommandType=CommandType.StoredProcedure;
    command.Parameters.Add("@userid",SqlDbType.VarChar,50).Value=userid;
    command.Parameters.Add("@pwd",SqlDbType.VarChar,50).Value=pwd;
    command.Parameters.Add("@return_id",SqlDbType.Int,4).Direction=ParameterDirection.Output;
    connection.Open();
    command.ExecuteNonQuery();
    把返回的数据集给报表的数据源就行了。。
      

  2.   

    Reporting Service中如何使用存储过程返回的结果作为报表的数据集?是在Microsoft SQL Server Reporting Service(微软报表服务)中。