Appending to a CLOB
| From: | Tom Tsongas | Date: | Tue, 25 Sep 2001 20:54:01 +0000 |
| Subject: | Appending to a CLOB | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-12704@lists.php.net to get a copy of this message | ||
Hi folks.
I am attempting to 'append' information to an Oracle CLOB and I seem to
be hitting snags everytime I try. We have a stored procedure for
appending to the CLOB but I can't seem to run it through the parser.
Here is the code in question:
// Append comment code
$clob = OCINewDescriptor($connection, OCI_D_LOB);
$sql1 = ("begin append_comments(:incident_id,:comments_id);end;");
$sth = OCIParse ( $db, $sql1 ) or die("Couldn't parse statement.");
OCIBindByName ( $sth, ":incident_id", &$incident, 10 );
OCIBindByName ($sth, ":comments_id", &$clob, -1, OCI_B_CLOB);
OCIExecute ( $sth ) or die("Couldn't execute statement.");
$clob->save($comments);
(Note that both $incident and $comments are brought in via a POST method
from an adjacent page)
The error I am getting is:
Warning: Supplied argument is not a valid OCI8-Connection resource in
/www/htdocs/Etrack/oracle_update.php on line 66
Couldn't parse statement.
Help!!
Tom Tsongas