title: Updating 3 Rows (fixed) Using 1 UPDATE Statement
body: <p>So far I have this code updating only 1 row but is there a way to specify the three rows? (3 different ID's)</p>
  
  <pre><code>Public Shared Sub UpdatePrice(ByVal NewPrice As Decimal, ByVal id As Integer)
  
      Dim dtoffenseinfo As New DataTable
  
      If Not DBConnection.State = ConnectionState.Open Then
          'open connection
          DBConnection.Open()
      Else
  
      End If
  
      cmd.Connection = DBConnection
  
      cmd.CommandText = "UPDATE tblStockPrice " &amp; _
                     " SET Price=" &amp; NewPrice &amp; " WHERE id=" &amp; id &amp; ""
  
  
      cmd.ExecuteNonQuery()
  
      DBConnection.Close()
  End Sub
  </code></pre>
  
  <p>I assume I need 2 more parameters for the other two rows and that would be fine.</p>