BLOB's y Oracle

From: Date: Wed, 10 Jan 2001 11:00:00 +0000
Subject: BLOB's y Oracle
Groups: php.general.es 
Request: Send a blank email to general-es+get-5636@lists.php.net to get a copy of this message
Hola a todos. Mi problema es el siguiente: estoy intentando introducir una imagen en un BLOB de Oracle. Para ello, basándome en un ejemplo del manual (function.ocinewdescriptor.html) ejecuto el siguiente código: ---------------------------------------------------------------------------- ----------------------------------------- /* test.php */ $conn = OCILogon("usuario","clave"); $lob = OCINewDescriptor($conn, OCI_D_LOB); // test( id NUMBER, data BLOB ) $stmt = OCIParse($conn,"INSERT INTO test ( id, data ) VALUES (1,EMPTY_BLOB()) returning data into :data"); OCIBindByName($stmt, ':data', &$lob, -1, OCI_B_BLOB); OCIExecute($stmt); if($lob->savefile("/ruta/al/grafico.gif")){ OCICommit($conn); echo "Blob successfully uploaded\n"; }else{ echo "Couldn't upload Blob\n"; } OCIFreeDescriptor($lob); OCIFreeStatement($stmt); OCILogoff($conn); ---------------------------------------------------------------------------- ----------------------------------------- Obtengo la siguiente salida: ---------------------------------------------------------------------------- ----------------------------------------- Warning: OCILobWrite: ORA-22990: LOB locators cannot span transactions in test.php on line 19 Couldn't upload Blob Fatal error: Call to undefined function: ocifreedescriptor() in /minerva/Minerva-WWW/www_root-nossl/emisor/test.php on line 25 ---------------------------------------------------------------------------- ----------------------------------------- ¿Alguien sabe lo que puede estar pasando? Muchas gracias, ---------------------------------------- Jaime López Jiménez Instituto de Ingeniería del Conocimiento Tel: +34 913 482 340 Fax: +34 913 482 334 Madrid (Spain) ----------------------------------------

« previous php.general.es (#5636) next »