Bonjour à tous !

Depuis ce matin, j'essai désespérément d'enregistrer un fichier PDF dans ma base de données par le biais d'un type BLOB.

J'ai beau tout tenter, ça ne marche pas. Quelqu'un saurait la syntaxe et comment faire ?

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
 
$requeteins = "insert into DOSSENT (DSE_FICHIER) values (EMPTY_BLOB()) returning DSE_FICHIER into :fichier";
$blob = ocinewdescriptor($conn, OCI_D_LOB);
$stmt = ociparse($conn,$requeteins);
OCIBindByName ($stmt, ":fichier", &$blob, -1, OCI_B_BLOB);
ociexecute($stmt);
$blob->import("devis.pdf");
ocicommit($conn);
Et il me retourne cette erreur
Code : Sélectionner tout - Visualiser dans une fenêtre à part
Warning: OCI-Lob::import() [function.OCI-Lob-import]: ORA-22990: LOB locators cannot span transactions in XXXX.php on line 24
Merci pour votre aide !