You have to lock the record containing the Blob In Oracle use the update
keyword:

select YourBlobColumn from image where yourId=? for update


"Riccardo F." wrote:

> How i can update a blob field on db using a stateful session bean?
> What does it means:
>
> java.io.IOException ORA-22920: row containing the LOB value is not locked
> ORA-06512: at "SYS.DBMS_LOB", line 700
> ORA-06512: at line 1
>
> my code is:
>
> resSet = pstmt.executeQuery(cmd);
> resSet.next();
> blob = ((OracleResultSet) resSet).getBLOB(1);
> out = blob.getBinaryOutputStream();
> out.write(<byte array>);
>
> Can anybody help me please?
>
> Tanks in advance.
>
> Riccardo.
> ----------------------------------------------
> Virgilio Mail - Il tuo indirizzo E-mail gratis
> http://mail.virgilio.it
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff EJB-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".

--
Bruno Antunes,
Java Software Engineer

email: mailto:[EMAIL PROTECTED]
Phone: +351.21.7994200
Fax  : +351.21.7994242

WhatEverSoft - Java Center
Centro de Competencia Java
Praca de Alvalade, 6 - Piso 4
1700-036 Lisboa - Portugal
URL: http://www.whatevernet.com



_____________________________________________________________________
                      INTERNET MAIL FOOTER
A presente mensagem pode conter informa��o considerada confidencial.
Se o receptor desta mensagem n�o for o destinat�rio indicado, fica
expressamente proibido de copiar ou endere�ar a mensagem a terceiros.
Em tal situa��o, o receptor dever� destruir a presente mensagem e por
gentileza informar o emissor de tal facto.
---------------------------------------------------------------------
Privileged or confidential information may be contained in this
message. If you are not the addressee indicated in this message, you
may not copy or deliver this message to anyone. In such case, you
should destroy this message and kindly notify the sender by reply
email.
---------------------------------------------------------------------

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to