On 08/05/2011 08:55 AM, n.a.mor...@brighton.ac.uk wrote:
Guys,

Can anyone help please?  I am using Oracle 10g (10.2.0.3) with PHP 5.2.5.

The following piece of code works with a CLOB, but not with an NCLOB.  Can 
anyone shed any light please?

There is no support for NCLOB in PHP OCI8.

Chris



$SQL = "
     UPDATE $d_sid.srs_spd SET spd_fuld = EMPTY_CLOB()
     WHERE spd_stuc = :stuc AND spd_seqn = :seqn AND spd_pdtc = 'VOAM'
     returning spd_fuld into :THE_CLOB
";
$Clob = oci_new_descriptor($conn, OCI_D_LOB);
$stmt = oci_parse($conn,$SQL);
if (!is_resource($stmt)) throw new Exception("Internal Error: E_SPD_POPULATE (Parse 
2)");
oci_bind_by_name($stmt,":stuc",$V->Get("Student"));
oci_bind_by_name($stmt,":seqn",$Out);
oci_bind_by_name($stmt,":THE_CLOB", $Clob, -1, OCI_B_CLOB);
$exec = oci_execute($stmt, OCI_DEFAULT);
if (!$exec) throw new Exception("Internal Error: E_SPD_POPULATE (Exec 2)");
$Clob->save($this->EMail);
if (!oci_commit($conn)) {
     oci_rollback($conn);
     throw new Exception("Internal Error: E_SPD_POPULATE - Can't Save Character 
Large Object");
}


Regards,

Neil Morgan PGCert MSc
IT Services
University of Brighton
Watts 137
Lewes Road
Brighton
BN2 4GJ

01273 643930




___________________________________________________________
This email has been scanned by MessageLabs' Email Security
System on behalf of the University of Brighton.
For more information see http://www.brighton.ac.uk/is/spam/
___________________________________________________________

--
Email: christopher.jo...@oracle.com
Tel:  +1 650 506 8630
Blog:  http://blogs.oracle.com/opal/

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

Reply via email to