title: not opening dataconnection using oledb
body: <p>I have this code which works properly in fidderent form. but somehow, in the specific form it doesn't work and I get this error(in the line <code>connction.Open();</code>) <code>Unspecified error</code></p>
  
  <p>the code suppose to add multiple rows into a table.
  here is the code:</p>
  
  <pre><code>                    for (int i = 0; st1.Length &gt; i; i++)
                      UpdateDataBase(st1[i]);
  
  
  private void UpdateDataBase(char letter)
      {
          int serialPro = 0;
          string connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;" +
                                    "Data Source=C:\\Projects_2012\\Project_Noam\\Access\\myProject.accdb";
          try
          {
              using (OleDbConnection connection = new OleDbConnection(connectionString))
              {
                  string sql = "SELECT tblProInfo.proInfoSerialNum FROM tblProInfo ";
                  using (OleDbCommand command = new OleDbCommand(sql, connection))
                  {
                      connection.Open();
                      OleDbDataReader reader = command.ExecuteReader();
                      //get the last!
                      while (reader.Read())
                          serialPro = reader.GetInt32(0);
  
                  }
                  sql = "INSERT INTO tblOrderAA (orderAASerialPro, orderAACodon1) "
                     + " values (?, ?)";
                  using (OleDbCommand command = new OleDbCommand(sql, connection))
                  {
                      command.CommandType = CommandType.Text;
                      command.Parameters.AddWithValue("orderAASerialPro", serialPro);
                      command.Parameters.AddWithValue("orderAACodon1", letter);
                      command.ExecuteNonQuery();
                  }
  
  
              }
          }
          catch (Exception e)
          {
              MessageBox.Show("error in:" + e.Message);
          }
      }
  </code></pre>
  
  <p>I know I can use MAX to get the last one. But it works rightly in different Form. So I insist to understand why!
  thank u all for helping.</p>