title: Oracle 11g DB returning Streams instead of Strings
body: <p>I've got a new database here and it's an upgraded version from Oracle 10g to Oracle 11g - the main problem is with LOB columns and everytime any function returns a LOB as result, the new database won't return strings like the old one did:</p>
  
  <p>Old DB:</p>
  
  <pre><code>["C"]=&gt;
  string(23) "3874163,3874197,3874201"
  </code></pre>
  
  <p>New DB:</p>
  
  <pre><code>["C"]=&gt;
  resource(182) of type (stream)
  </code></pre>
  
  <p>Now when reading the streams sometimes there is an error of a non-existing stream resource beeing referenced and everything fails. I'm guessing the connection closed in the meantime without the stream beeing read and therefore the access is lost.</p>
  
  <p>When changing the statements to include a casting against varchar for example:</p>
  
  <pre><code>CONVERT(VARCHAR, C, 120)
  </code></pre>
  
  <p>Or like this:</p>
  
  <pre><code>SELECT TO_CHAR(FUNC())
  </code></pre>
  
  <p>The value is returned as a string again but this is not really an optimal solution as every statement would need to be changed.</p>
  
  <p>Is there any way/option to prevent LOBs from beeing delivered as streams so they are instead delivered as strings like in Oracle 10g?</p>
  
  <p><strong>Edit:</strong><br>
  We are using the oci function-set for db access.</p>