venkatkodali
asked on
Java PL/SQL BLOB
how can i return a blob from stored procedure and how to parse the returned blob from stored procedure in java.
Although you will need to use a callable statement for the stored proc:
CallableStatement stmt = con.prepareCall( "{call spu_get_image()}");
ResultSet rs = stmt.executeQuery();
CallableStatement stmt = con.prepareCall( "{call spu_get_image()}");
ResultSet rs = stmt.executeQuery();
ASKER
how to get a blob from stored procedure
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ResultSet rs = s.executeQuery("SELECT image FROM myImageTable");
if (rs.next())
{
Blob blob = rs.getBlob("image ");
long n = blob.length();
byte[] bytes = blob.getBytes(1, n);
Image i = Toolkit.getDefaultToolkit(
}