title: VB.NET Datatable to Mysql
body: <p>I'm creating an application which allows you to manage various data. The application is designed to work in a network, and thus in multi-user. For this reason I decided to trust the Datatable.</p>
  
  <p>I have a class created by me for the management of operations MYSQL Database but now I still can not create a streamlined process to send the datatable to MySQL database.
  Currently I am so</p>
  
  <pre><code>    Dim SQLStm As String
      'variable for sql query
      Dim SQLManager As New ER.DB.ERMysql
  
      For Each Riga In Datatable.Rows
          'example query
          SQLStm = "INSERT INTO test(Name,Phone)VALUES(Riga("Name"),Riga("Phone"))"
          Try
              Dim CMD As New MySqlCommand
              CMD.Connection = connection
              CMD.CommandText = SQLStm
              CMD.ExecuteNonQuery()
          Catch ex As Exception
          End Try
      Next
  
  
  End Sub
  </code></pre>
  
  <p>or skim all the rows and gradually sending to the database. There is a better way to accomplish this? </p>
  
  <p>Thanks to all</p>