title: UPDATE MySQL using VB.NET
body: <p>I am using VB.NET with a MySQL database.  I want to update this code to do it all in ONE SQL instead of THREE.  Anyone know how?</p>
  
  <p>Here's the code I'm using, works fine but too slow with multiple lines...</p>
  
  <pre><code>If count3 = "1" Then
  
      Dim myCommand As New MySqlCommand
      Dim myAdapter As New MySqlDataAdapter
      Dim SQL As String
      myCommand.Connection = conn
      myAdapter.SelectCommand = myCommand
      SQL = "UPDATE employees SET emprole1 = '" &amp; val2 &amp; "' WHERE emprole1 = '" &amp; val1 &amp; "'"
      myCommand.CommandText = SQL
      myCommand.ExecuteNonQuery()
      SQL = "UPDATE employees SET emprole2 = '" &amp; val3 &amp; "' WHERE emprole2 = '" &amp; val2 &amp; "'"
      myCommand.CommandText = SQL
      myCommand.ExecuteNonQuery()
      SQL = "UPDATE employees SET emprole3 = '" &amp; val4 &amp; "' WHERE emprole3 = '" &amp; val3 &amp; "'"
      myCommand.CommandText = SQL
      myCommand.ExecuteNonQuery()
  
  End If
  </code></pre>