How to retrieve temporary BLOB value from PLSQL to Java?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Corrine

    How to retrieve temporary BLOB value from PLSQL to Java?

    I am trying to pass a temporary BLOB that I've created in Java, to a
    PLSQL function that modifies it, and then to retrieve this modified
    value back to Java, all using JDBC.

    I can't figure out how to get the modified BLOB object back to Java
    after the PLSQL block has finished executing.

    I do:

    BLOB bl = BLOB.createTemp orary(db,true,B LOB.DURATION_SE SSION);
    CallableStateme nt plsqlblock = conn.prepareCal l(
    "declare\n" +
    " stuff... \n"+
    "begin\n"+
    " procThatModifie sBLOB(?);\n"+
    "end;\n");
    plsqlblock.setB lob(1, bl);
    plsqlblock.exec ute();

    bl = plsqlblock.getB lob(1); //**** doesn't work.

    How do I retrieve the modified value of "bl" after "plsqlblock "
    finishes executing?
Working...