title: Oracle and Powershell return only the first line
body: <p>I have a problem with powershell and oracle.</p>
  
  <p>This is my code </p>
  
  <pre><code>Add-Type -Path "C:\app\aasif\product\11.2.0\client_2\odp.net\managed\common\Oracle.ManagedDataAccess.dll"
  
  $con = New-Object Oracle.ManagedDataAccess.Client.OracleConnection("User Id=sys;Password=password;Data Source=myserver/oracle;DBA privilege=SYSDBA")
  
  $con.Open()
  $cmd=$con.CreateCommand()
  $cmd.CommandText="select distinct owner from all_tables where table_name = 'mytable'"
  
  $rdr=$cmd.ExecuteReader()
  
  if ($rdr.Read()) {
    $rdr.GetString(0)
  }
  
  $con.Close()
  </code></pre>
  
  <p>When i execute this query directly with SQLPlus, i have :</p>
  
  <pre><code>RS123
  RS456
  RS789
  RS741
  RS963
  </code></pre>
  
  <p>With my powershell, i can't view all the data returned by the query, but only the first line.</p>
  
  <pre><code>RS123
  </code></pre>
  
  <p>How can i do this?</p>
  
  <p>Thanks</p>