title: How to pass list of string to stored procedure
body: <pre><code>  public DataSet ViewQuizDetails(List&lt;string&gt; name)
      {
          DataSet dsGrades = null;
          var dbCon = new DBConnection("Quiz");
          foreach(string val in name)
          {
              dbCon.AddParameter("@name", val);
              dsGrades = dbCon.Execute_DataSet("spViewQuizDetails", null);
          }            
          return dsGrades;
      }
  
  ALTER PROCEDURE [dbo].[spViewQuizDetails]
      -- Add the parameters for the stored procedure here
      @name varchar(30)
  AS
  BEGIN
      -- SET NOCOUNT ON added to prevent extra result sets from
      -- interfering with SELECT statements.
      SET NOCOUNT ON;
  
      -- Insert statements for procedure here
      --SELECT * FROM QuizDetails INNER JOIN Elearning 
      --ON QuizDetails.ElearningId=Elearning.ElearningId  ;
      SELECT * 
      FROM QuizDetails INNER JOIN Elearning 
      ON QuizDetails.ElearningId=Elearning.ElearningId where ElearningName=@name 
  END
  </code></pre>
  
  <p>When I pass multiple values I'm getting the following error.  </p>
  
  <blockquote>
    <p>Error received: Procedure or function spViewQuizDetails has too many arguments
    specified.</p>
  </blockquote>