Oracle NClobs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

$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/
___________________________________________________________

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux