title: Delete query when in a loop gives first chance error second time through
body: <p>This code in my vb.net controller:</p>
  
  <pre><code> For i = 0 To depToDelete.Count - 1
       cmd.CommandText = "delete from budget.budget_monthlybudgetfees where guid in(@strdepToDelete, @strOtherToDelete);"
       cmd.Parameters.Add("@strdepToDelete", MySql.Data.MySqlClient.MySqlDbType.VarChar, 36).Value = depToDelete(i)
       cmd.Parameters.Add("@strOtherToDelete", MySql.Data.MySqlClient.MySqlDbType.VarChar, 36).Value = otherToDelete(i)
        Try
          cmd.ExecuteNonQuery()
          success = True
        Catch ex As Exception
          success = False
        End Try
    Next
  </code></pre>
  
  <p>I have set the connection string earlier.  The delete query runs first time through but second time it throws a "first chance exception of type 'MySql.Data.MySqlClient.MySqlException' in MySql.Data.dll.  I have tried putting Trim on parameters as per another post suggestion, but still the same error.  I have tried setting cmd.CommandText to "" at beginning of loop but no change.</p>