LOB support for oci8 broken ?
| From: | Andreas Jung | Date: | Wed, 03 May 2000 08:15:50 +0000 |
| Subject: | LOB support for oci8 broken ? | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-14413@lists.php.net to get a copy of this message | ||
Hi,
I tried the following (according to the documentation)
to insert a LOB into an O8i table with a CLOB field "inhalt":
#!/ojs/home/ora8/tmp/php
<?
$conn = OCILogon("dummy","dummy","fulltext");
$stmt = OCIParse($conn,"insert into fulltext (docnum,inhalt) values('blabla',:mb )
");
$clob = OCINewDescriptor($conn, OCI_D_LOB);
OCIBindByName($stmt,':mb',&$clob,-1,OCI_B_CLOB);
$s="";
for ($i=0;$i<2000;$i++) $s.="x";
OCIExecute($stmt,OCI_DEFAULT);
if($clob->save($s)) OCICommit($conn);
else echo "clob problem";
OCIFreeStatement($stmt);
OCILogoff($conn);
?>
However the code fails with the following 2 errors:
X-Powered-By: PHP/4.0RC2-dev
Content-type: text/html
<br>
<b>Warning</b>: OCIStmtExecute: ORA-22275: invalid LOB locator specified
in <b>./test.php3</b> on line <b>12</b><br>
<br>
<b>Warning</b>: OCILobWrite: OCI_INVALID_HANDLE in <b>./test.php3</b> on
line <b>13</b><br>
clob problem
This LOB problem is driving me more and more crazy.
Any idea why this code won't work ?
Merci,
Andreas