title: "An operation is already in progress" on DataAdaper.Fill
body: <p>I am trying the Postgres Plus 9.5 with .Net 4.5, Npgsql 3.1.6 NuGet package.
  I have read what is here about this error, but I do not understand why I get it. Everything is disposed. Here the is code:</p>
  
  <pre><code>public override DataTable getActListData(int FunkNr)
  {
    using (var cmd = new NpgsqlCommand())
    {
      cmd.CommandText = npgsqlCommand3.CommandText;
      cmd.Connection = this.npgsqlConnection;
      cmd.Parameters.Add(new Npgsql.NpgsqlParameter("ANWENDUNG", NpgsqlTypes.NpgsqlDbType.Numeric));
      cmd.Parameters.Add(new Npgsql.NpgsqlParameter("XFUNKNR", NpgsqlTypes.NpgsqlDbType.Numeric));
  
  
      using (var da = new NpgsqlDataAdapter(npgsqlCommand3))
      {
        var tab = new DataTable();
        da.SelectCommand.Parameters["ANWENDUNG"].Value = getAnwendung();
        da.SelectCommand.Parameters["XFUNKNR"].Value = FunkNr;
        da.Fill(tab);  // Here is the error on the 5th call
        return tab;
      }
    }
  }
  </code></pre>
  
  <p>Does this problem comes from Npgsql or is from Postgres?</p>
  
  <p>Some other questions:</p>
  
  <p>I have read here, that lazy loading is impossible, but I didn't understand is is because of the Npgsql or from Postgres?</p>
  
  <p>Is it possible in Postgres to open several cursors and read on demand in the same connection?</p>
  
  <p>Edit: Changed the code:</p>
  
  <pre><code>  using (var npgsqlConnection = new NpgsqlConnection())
    {
      ConnectionString = string.Format(DataClientFactory.DataBaseConnectString, DB, User, PW);
      npgsqlConnection.ConnectionString = ConnectionString;
      npgsqlConnection.Open();
      ....
      the code above here
      ....
   }
  </code></pre>
  
  <p>The same error in the same call. The error:</p>
  
  <pre><code>System.InvalidOperationException occurred
    HResult=-2146233079
    Message=An operation is already in progress.
    Source=Npgsql
    StackTrace:
         bei Npgsql.NpgsqlConnector.StartUserAction(ConnectorState newState)
    InnerException: 
  </code></pre>