|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2316 'Document contains no data' when fetching/loading empty lob values
Submitted: 1999-09-16 16:58 UTC Modified: 2006-07-17 08:52 UTC
From: robert dot everett at wcom dot com Assigned:
Status: Closed Package: OCI8 related
PHP Version: 3.0.12 OS: Solaris 2.6
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
47 - 26 = ?
Subscribe to this entry?

 [1999-09-16 16:58 UTC] robert dot everett at wcom dot com
Calling the load() method on a lob locator or calling OCIFetchInto with the OCI_RETURN_LOBS flag set causes the error 'Document contains no data' if the value of the lob is empty (i.e., initialized with empty_clob() or empty_blob()). No error occurs if the value is null (i.e., uninitialized) or contains data.

Here are the details:

PHP 3.0.12
Apache 1.3.9
Oracle 8.0.4
Solaris 2.6

$stmt = OCIParse($conn, "insert into foobar (id, lob1, lob2) values (1, null, empty_clob())");

$stmt = OCIParse($conn, "select lob1, lob2 from foobar where id = 1");
$lob1 = OCIResults($stmt, 0);
$contents1 = $lob1->load; //**OK
$lob2 = OCIResults($stmt, 1);
$contents2 = $lob2->load; //**error occurs

-- OR --

$stmt = OCIParse($conn, "select lob2 from foobar");
OCIFetchInto($stmt, &$results, OCI_RETURN_LOBS); //**error occurs


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [1999-09-17 04:20 UTC] thies at cvs dot php dot net
fixed in CVS!	
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 21 13:01:28 2024 UTC