Span Transactions

wxdqz

New Member
Hey, can any help me in a strange problem using PHP + Oracle.
I want upload a file to my DB in a blob field. See my code:

$lob = OCINewDescriptor($con,OCI_D_LOB);
$st2 = OCIParse($con,"UPDATE EMP SET EMP_LOGO = EMPTY_BLOB() WHERE emp_codigo = $emp_codigo returning EMP_LOGO INTO :EMP_LOGO");
OCIBindByName($st2,':EMP_LOGO',&$lob,-1,OCI_B_BLOB);
OCIExecute($st2);
if($lob->savefile($logo))
OCIcommit();

$logo is the file.

I get the error in the "$lob->savefile" line:

Warning: OCILobWrite: ORA-22990: LOB locators cannot span transactions in C:\Publico\Projetos_1\MOLWebSite\adm_em_co_salva.php on line 44


There is too few documentation about and I've tried all I could read. Now I gotta to ask you.

Thanks.
 
Back
Top