Re: [PHP4BETA] LOB support for oci8 broken ?

From: Date: Wed, 03 May 2000 08:48:11 +0000
Subject: Re: [PHP4BETA] LOB support for oci8 broken ?
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-14415@lists.php.net to get a copy of this message
Andreas Jung wrote: > > Hi, > > I tried the following (according to the documentation) > to insert a LOB into an O8i table with a CLOB field "inhalt": > > #!/ojs/home/ora8/tmp/php > <? > > $conn = OCILogon("dummy","dummy","fulltext"); > $stmt = OCIParse($conn,"insert into fulltext (docnum,inhalt) > values('blabla',:mb ) "); > > $clob = OCINewDescriptor($conn, OCI_D_LOB); > OCIBindByName($stmt,':mb',&$clob,-1,OCI_B_CLOB); > > $s=""; > for ($i=0;$i<2000;$i++) $s.="x"; > > OCIExecute($stmt,OCI_DEFAULT); > if($clob->save($s)) OCICommit($conn); > else echo "clob problem"; > > OCIFreeStatement($stmt); > > OCILogoff($conn); > > ?> Try the following: (Yes, Oracle LOB support is ahm ...) <? ... $clob = OCINewDescriptor($conn, OCI_D_LOB); $stmt = OCIParse($conn,"insert into fulltext (docnum,inhalt) values('blabla', EMPTY_BLOB()) returning inhalt into :mb"); OCIBindByName($stmt,':mb',&$clob,-1,OCI_B_CLOB); $s=""; ... ?> -Andreas -- Andreas Karajannis GMD National Research Center for Information Technology Schloss Birlinghoven, D-53754 Sankt Augustin Phone +49 2241 142948

« previous php.version4 (#14415) next »