title: The connection was not closed. The connection's current state is open
body: <pre><code>Try
      If functionmode = "ADD" Then
          SQLStr = "INSERT INTO boatmast VALUES ('" &amp; gBoatType &amp; "','" &amp; TxtBoatCode.Text &amp; "','" &amp; TxtBoatName.Text &amp; "','" &amp; Format(txtBP.Text, "##0.#0") &amp; "','" &amp; Format(txtBPM.Text, "##0.#0") &amp; "','" &amp; Format(txtLDA.Text, "##0.#0") &amp; "','" &amp; , 'bpk', '" &amp; Today &amp; "', '" &amp; updtime &amp; "', 'bpk', '" &amp; Today &amp; "', '" &amp; updtime &amp; "')"
      End If
      conn.Open()
      SQLCmd.Connection = conn
      SQLCmd.CommandText = SQLStr
      SQLCmd.ExecuteNonQuery()
      conn.Close()
  
  
  Catch ex As OdbcException
      MsgBox(ex.ToString)
  Finally
      conn.Close()
  End Try
  </code></pre>