Mantis - Quercus
Viewing Issue Advanced Details
4224 block always 09-24-10 09:11 09-24-10 09:11
ryagatich  
 
normal  
new 4.0.8  
open  
none    
none  
0004224: Cannot retrieve VARCHAR/VARCHAR2 columns from Oracle 11g database
Sample Code:

$queries = Array("select cast('hello' as varchar2(100)) as a from dual",
                 "select cast('hello' as char(100)) as a from dual");
$dbh = oci_pconnect($u, $p, $s);
foreach ($queries as $query) {
   print "" . $query . "
";
   $stmt = oci_parse($dbh, $query);
   if (oci_execute($stmt)) { 
       while ($row = oci_fetch_object($stmt)) { 
          print_r($row);
       }
   }
   oci_free_statement($stmt);
   print "


";
}
oci_close($dbh);

From the above, the first query reported returns a null string for the value "A", whereas the second query reports "hello" for the value "A".

Expected results: "hello" is returned in both instances.

Other tests against this same set of queries have been performed in the following manner:
   a) Using "php" brand php from the command line <-- works
   b) Using Quercus CLI (com.caucho.quercus.CliQuercus) <-- fails
   c) Using pure Java implementation of "oracle.jdbc.xa.client.OracleXADataSource" <-- works
   d) Using pure Java implementation of oracle.jdbc.driver.OracleDriver <-- works
   e) Using Quercus deployed via Weblogic Application Server <-- fails

By "works", I mean that the string "hello" is reported in both instances.
   
This is actually one of many issues we are having connecting to our Oracle (i.e. honoring of tnsnames.ora), and seems that we are missing any relevant documentation pertaining to such installation. We're willing to accept not having various settings correct in our environment, but do need to have a clear understanding of how to execute this detail.

There are no notes attached to this issue.