title: how to connect to oracle 10g using visual studio 2013
body: <p>I am new to oracle database, so i wanted to know how i can connect to an <code>oracle 10g</code> database using visual studio 2013.
  Well i went to the server explorer and add connection where i chose the data source as <code>Oracle Database</code> and the data provider as <code>.NET Framework Data Provider for OLE DB</code>.
  After that on testing the connection i get the error message as-
  <code>ORA-06413: Connection not open.</code></p>
  
  <p>I searched a lot but couldn't find a proper answer to this question..
  Can somebody help me out please.</p>
  
  <p>OK so this is what I have done till now-</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>using System;
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.Data;
  using System.Data.OleDb;
  using System.Drawing;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using System.Windows.Forms;
  
  namespace Hostel_Management_System
  {
      public partial class Form1 : Form
      {
          public Form1()
          {
              InitializeComponent();
          }
  
          private void btn_login_Click(object sender, EventArgs e)
          {
              OleDbConnection con = new OleDbConnection("Data Source=localhost;Initial Catalog=XE;Provider=SQLOLEDB;user-name=system;password=mypassword");
              con.Open();
              MessageBox.Show(con.State);
          }
      }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>And I am getting a System.Data.OleDb.OleDbException in System.Data.dll.</p>
  
  <p>Is this of any help??</p>
  
  <p>[1]. <a href="http://i.stack.imgur.com/KUlZc.png" rel="nofollow">http://i.stack.imgur.com/KUlZc.png</a></p>