title: Connecting Oracle Database to Windows application C#
body: <p>ultimate beginner here in C#. Here is the big picture background: This application will take a scanned barcode into a textbox, I presume, and just compare database value from 1 table to see if anything matches it. If not, then an error will display. If it does the user will then continue to fill in information into the ERP system. </p>
  
  <p>Currently, I'm just trying to connect my application to the database and am getting nowhere. We use Oracle. </p>
  
  <p>Here is my code that doesn't work so far: </p>
  
  <pre><code>    using System;
      using System.Collections.Generic;
      using System.ComponentModel;
      using System.Data;
      using System.Drawing;
      using System.Linq;
      using System.Text;
      using System.Threading.Tasks;
      using System.Windows.Forms;
  System.Data.OracleClient.OracleConnection;
  
  namespace WindowsFormsApplication9
  {
      {
      public void CreateOracleConnection()
      {
          string connectionString = "Data Source=Oracle8i;Integrated Security=yes";
          using (OracleConnection connection = new OracleConnection(connectionString))
          {
              connection.Open();
              Console.WriteLine("ServerVersion: " + connection.ServerVersion
                  + "\nDataSource: " + connection.DataSource);
          }
      }
      public partial class Form1 : Form
      {
          public Form1()
          {
              InitializeComponent();
          }
  
          private void textBox1_TextChanged(object sender, EventArgs e)
          {
  
          }
  
          private void Form1_Load(object sender, EventArgs e)
          {
  
          }
      }
  }
  </code></pre>
  
  <p>There is probably a lot wrong going on here but if someone can just nudge me in the right direction it would be much appreciated. As each time I find sample code it's pretty old and obsolete. I've also read about needing references for the Oracle database and have no idea about any of that either. </p>
  
  <p>So thanks for helping out a severely lost newbie. </p>
  
  <p>edit: As stated below I didn't actually specifiy what <em>isn't</em> working for me. What isn't working seems to be the actual database connection it seems. I keep getting an error that states: </p>
  
  <p>"The type or namespace name 'OracleConnection' could not be found(are you missing using a directive or an assembly reference?)"</p>