title: Dynamic parameters in a Stored Procedure?
body: <p>I need to update a table with values from a listbox. I am trying to create as many parameters as there are items in the list, my code below, but how do i name them differently? so that they dont' overwrite each other?</p>
  
  <pre><code> For Each item As ListItem In ris
          Dim pID As New SqlParameter("@userid", SqlDbType.Int)
          pID.Value = objFormat.CheckSQL(item.Value)
          myCommand.Parameters.Add(pID)
      Next
  </code></pre>
  
  <p>and on the SQL side, is it possible to write an update statement, that will take a dynamic number of parameters?</p>
  
  <p>so for example, i need to update multiple users with the same value in the "active" field...</p>