title: Connect to Oracle table in Visual Studio 2019 VB
body: <p>I've been beating my head against the wall for far too long on this.</p>
  <p>What is the code to connect to an Oracle table through Visual Studio 2019 - using Visual Basic?</p>
  <p>On a form load event, I want to connect to Oracle, and import the data from a specific table and then paste it into a new Excel file.</p>
  <p>------------------------------------------------------------------------<br></p>
  <pre><code>Imports System.Data
  Imports Microsoft.Office.Interop.Excel
  
  Public Class ImportForm
  Private Sub ImportForm_Load(sender As Object, e As System.EventArgs) Handles Me.Load
            Dim conn As New OleDbConnection(&quot;Data Source=123.123.1.12:1521;User Id=test&quot;)  'fake data
            conn.Open()
               (select data and put into Excel)
            conn.Dispose()
       End Sub 
  End Class
  </code></pre>