title: OLEDB using 32bit instead of 64bit
body: <p>I need to import some datafrom a Excel worksheet but the OleDbConnection is using the 32bit version, so it cant find the provider. I already imported using the 64bit wizzard and everything is working fine.</p>
  
  <p>Already tried using the following connection string:</p>
  
  <pre><code>Provider=Microsoft.ACE.OLEDB.12.0;
  </code></pre>
  
  <pre><code>  Public Shared Function ExcelToSqlServer() As Integer
  
          Dim ds As New DataSet
          Dim da As New OleDbDataAdapter
  
          Dim conn As New OleDbConnection
  
  
  
          Dim cnn As New SqlConnection
          Dim sqlBC As SqlBulkCopy
  
          Dim myFileDialog As New System.Windows.Forms.OpenFileDialog
          Dim xSheet As String = ""
  
          With myFileDialog
              .Filter = "Excel Files |*.xlsx"
              .Title = "Open File"
              .ShowDialog()
          End With
  
          If myFileDialog.FileName.ToString &lt;&gt; "" Then
              Dim ExcelFile As String = myFileDialog.FileName.ToString
              xSheet = "Incidentes"
  
              conn = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;" &amp; "data source=" &amp; ExcelFile &amp; "; " &amp; "Extended Properties='Excel 12.0 Xml;HDR=Yes'")
  
              Try
                  conn.Open()
                  da = New OleDbDataAdapter("SELECT * FROM  [" &amp; xSheet &amp; "$]", conn)
                  ds = New DataSet
                  da.Fill(ds)
  
                  sqlBC = New SqlBulkCopy(cnn)
                  sqlBC.DestinationTableName = "Incidentes"
                  sqlBC.WriteToServer(ds.Tables(0))
                  conn.Close()
                  Return 1
              Catch ex As Exception
                  MsgBox("Error: " + ex.ToString, MsgBoxStyle.Information, "Informacion")
                  conn.Close()
                  Return -1
              End Try
          End If
          Return -1
      End Function
  
  </code></pre>
  
  <p>I get the following error when I run this function
  <img src="https://i.imgur.com/RKYtq2r.png" alt="1"></p>