Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

nisc wwwxxx, wwwxxx0cm, should producers of software-based services, such as atms, be held liable for economic injuries suffered when their systems fail?, wwwxxx0cm, www.webdp.net, Event 9 IIS log failed to write entry, wwwxxx jeffs, Catastrophic failure Unexpected method call sequence. 0x8000ffff (-2147418113)., ksh lock a file, [unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_DBC failed

Links

XODOX
Impressum

#1: Oracle NClobs

Posted on 2011-08-05 17:55:22 by N.A.Morgan

--_000_FD5B9DB59B0CCC4D876D99BFCDB566E63E8B06B1BELLATRIXuniv er_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

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 =3D "
UPDATE $d_sid.srs_spd SET spd_fuld =3D EMPTY_CLOB()
WHERE spd_stuc =3D :stuc AND spd_seqn =3D :seqn AND spd_pdtc =3D 'VOAM=
'
returning spd_fuld into :THE_CLOB
";
$Clob =3D oci_new_descriptor($conn, OCI_D_LOB);
$stmt =3D oci_parse($conn,$SQL);
if (!is_resource($stmt)) throw new Exception("Internal Error: E_SPD_POPULA=
TE (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 =3D 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 Chara=
cter 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/
___________________________________________________________
--_000_FD5B9DB59B0CCC4D876D99BFCDB566E63E8B06B1BELLATRIXuniv er_--

Report this message

#2: Re: Oracle NClobs

Posted on 2011-08-05 18:08:11 by Lester Caine

N.A.Morgan@brighton.ac.uk wrote:
> Can anyone help please? I am using Oracle 10g (10.2.0.3) with PHP 5.2.5.
It may not be related, but there were a number of issues with BLOB ids in
Firebird which were not fixed until 5.2.7, I don't have anything that old
running now, but I think that it was not only Firebird that was affected by the
problem.

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

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

Report this message

#3: RE: Oracle NClobs

Posted on 2011-08-05 18:25:57 by N.A.Morgan

Lester,

Thanks for the advice, I tried to run this on a 5.2.17 install as well wit=
h the same results.

Thanks anyway,
Neil

-----Original Message-----
From: Lester Caine [mailto:lester@lsces.co.uk]=20
Sent: 05 August 2011 17:08
To: php-db@lists.php.net
Subject: Re: [PHP-DB] Oracle NClobs

N.A.Morgan@brighton.ac.uk wrote:
> Can anyone help please? I am using Oracle 10g (10.2.0.3) with PHP 5.2.5=
..
It may not be related, but there were a number of issues with BLOB ids in=20=

Firebird which were not fixed until 5.2.7, I don't have anything that old=20=

running now, but I think that it was not only Firebird that was affected b=
y the=20
problem.

--=20
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=3Dcontact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

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


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

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

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

Report this message

#4: Re: Oracle NClobs

Posted on 2011-08-05 18:35:26 by Christopher Jones

On 08/05/2011 09:08 AM, Lester Caine wrote:
> N.A.Morgan@brighton.ac.uk wrote:
>> Can anyone help please? I am using Oracle 10g (10.2.0.3) with PHP 5.2.5.
> It may not be related, but there were a number of issues with BLOB ids in Firebird which were not fixed until 5.2.7, I don't have anything that old running now, but I think that it was not only Firebird that was affected by the problem.
>

It's not related in any way.

Chris

--
Email: christopher.jones@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

Report this message

#5: Re: Oracle NClobs

Posted on 2011-08-05 18:36:35 by Christopher Jones

On 08/05/2011 08:55 AM, N.A.Morgan@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.jones@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

Report this message