Re: why can't I insert long string into CLOB field?
| From: | David Newcomb | Date: | Wed, 30 Aug 2000 10:39:24 +0000 |
| Subject: | Re: why can't I insert long string into CLOB field? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-2475@lists.php.net to get a copy of this message | ||
I think you have to treat CLOBs and BLOBs differently
that ``real'' types. I do something like:
$myuid = get_uniq_id("seq");
run_sql(" insert into table ($myuid, 'myfield1','myfield2') ");
$lob = OCINewDescriptor($dbcon,OCI_D_LOB);
$sql = " update table
set myfield3 = EMPTY_BLOB()
where uid = $myuid
returning myfield3 into :the_blob";
$stmt = OCIParse(...
OCIBindByName($stmt, ':the_blob', &$lob, -1, OCI_B_BLOB)
OCIExecute(....
HTH,
David.
----- Original Message -----
From: Fred Cai <Fred.Cai@51job.com>
To: <php-db@lists.php.net>
Sent: Wednesday, August 30, 2000 9:29 AM
Subject: [PHP-DB] why can't I insert long string into CLOB field?
> evironment: PHP4 + oracle8
>
> I have a table which have a CLOB field,
> when I insert a string about 4k length into the CLOB field in PHP, there
is
> a error;
>
> The SQL statement:
> insert into table_name values (..., long_string ,...);
>
>
> "Warning: Ora_Parse failed (ORA-01704: the string is too long -- while
> processing OCI function OPARSE) in ./db/oracle.php on line 110"
>
> Why? and how to solve it?
> Who could tell me?
> I'll be very thankful,:-)
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>