title: Connection error C#
body: <pre><code>private OleDbConnection conexao;
  private Timer time = new Timer();
  
  public void Conexao() //Conexão
  {
     string strcon = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|DB.accdb";
     conexao = new OleDbConnection(strcon);
  }
  
  void tabela()
  {
     Conexao();
     conexao.Open();
     label1.Text = DateTime.Now.ToString();
     string bn = "select D2 from Planilha where D2='" + label1.Text + "'";
     textBox1.Text = label1.Text;
     OleDbCommand Queryyy = new OleDbCommand(bn, conexao);
     OleDbDataReader drr;
     drr = Queryyy.ExecuteReader();
     if (drr.Read() == true)
     {
        try
        {
           MessageBox.Show("Hi");
        }
        catch (OleDbException ex)
        {
           MessageBox.Show("" + ex);
        }
     }
  }
  
  private void timer1_Tick(object sender, EventArgs e)
  {
     tabela();
  }
  </code></pre>
  
  <p>Timer Interval = 1000</p>
  
  <p><sub>(click for larger view)</sub><br>
  <a href="https://i.stack.imgur.com/2g8QA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2g8QA.png" alt="http://i.stack.imgur.com/2g8QA.png"></a></p>
  
  <p>I'm all afternoon trying to fix it but could not so I come here for help</p>