title: Runtime error 3001 'Arguments are of the wrong type or out of acceptable range…' INSERT INTO MySQL Database
body: <p>I know there is lot of question of the same type but no one helped me and I'am really stuck. 
  So I'am trying to send Data from an Excel table with VBA and I always get the same error : 'Runtime error 3001 'Arguments are of the wrong type or out of acceptable range' 
  The thing is i can't understand where my mistake comes from ? Is it from my SQL query or from the visual basic code ? 
  My code is in 3 sub </p>
  
  
  
  <pre class="lang-vb prettyprint-override"><code>Dim oConn As ADODB.Connection
  </code></pre>
  
  <p>the second one </p>
  
  <pre class="lang-vb prettyprint-override"><code>Private Sub ConnectDB()
      Set oConn = New ADODB.Connection
      Dim str As String
  
      str = "DRIVER={MySQL ODBC 5.1 Driver};" &amp; _
            "SERVER=XXX.XXX.XXX.XXX" &amp; ";" &amp; _
            "PORT=3306" &amp; ";" &amp; _
            "DATABASE=myDB" &amp; ";" &amp; _
            "USER=User" &amp; ";" &amp; _
            "PASSWORD=pwd" &amp; ";" &amp; _
            "Option=3"
  
      ''' error '''
      oConn.Open str
  End Sub
  </code></pre>
  
  <p>And the last one </p>
  
  <pre class="lang-vb prettyprint-override"><code>Sub InsertData()    
      Dim Rs As ADODB.Recordset
  
      Dim Requete As String
  
      Set Rs = New ADODB.Recordset
      Call ConnectDB
      With Sheets("Feuil5")
          Requete = "INSERT INTO Position (Emplacement,Etage,Colonne,Taille) VALUES ('1','1','1','1');"
          Rs.Open Requete, oConnect, adOpenDynamic, adLockOptimistic
      End With
      Debug.Print Requete
      oConnect.Close
      Set Rs = Nothing
  End Sub
  </code></pre>
  
  <p>Could someone find my mistake and help realisyzing and simple sql query in vba ? </p>