Re: CLOB->load() error (OCI8 against Oracle 10G ) More Detail

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The problem in more detail:

I have a class called DbConn and in that class I have a function
called select() which calls another function runQuery().  runQuery()
executes the sql.  select() loops over the result set with
OCIFetchInto like this:

158 while(OCIFetchInto($this->sth,$this->row[$i],OCI_ASSOC+OCI_RETURN_NULLS)){
159   $i++;
160 }

putting the results in the objects "row" memeber which happens to be
an array.  if, inside this loop inside the select() function, i try to
run load() on my clob, it works perfectly fine.  like this:

158 while(OCIFetchInto($this->sth, $this->row[$i],OCI_ASSOC+OCI_RETURN_NULLS)){
159   if (isset($this->row[$i]["EXCEPTIONS"])) {
160     $t = $this->row[$i]["EXCEPTIONS"];
161     trigger_error("loaded clob value:  " . $t->load());
162   }
163   $i++;
164 }


however, the sole purpose of this function is to load up the result
set into an array for later accesss by a function called getRow().  if
in getRow(), i try to run load on the clob, i get the error:

PHP Warning:  load(): OCILobGetLength: OCI_INVALID_HANDLE

Things to note:

if i var_dump($clob) inside the select() function, i get the SAME
output i get  if i var_dump($clob) in getRow() even though load
doesn't work in getRow() due to an invalid oci handle??

if i use a blob instead of clob, load works everywhere the blob is used.

Basically it appears that within the scope of the select() function
where $this->row is populated, the clob retains all of its properties.
 Once the function ends, even tho the DbConn object remains intact,
the clob somehow loses some stuff but still believes itself to be an
OCI-Lob object.

Any ideas why this might be?

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux