When I insert blob data into Oracle database, it is partially inserted. Iam using the following code for insertion.
oracle.sql.BLOB newBlob =oracle.sql.BLOB.createTemporary(conn, false, oracle.sql.BLOB.DURATION_SESSION);
newBlob.putBytes(1, str.getBytes());
ps.setBlob(1, newBlob);
I checked whether the data got inserted or not by querying the data and converting it into jpeg image, sometimes I am getting partial image. Rest of the image is grey. Most of the time I am getting full image perfectly. What may the reason for this partial insertion?
str? How are you extracting it? I'm not sure if it's clear whether the problem is in the insertion, storage, retrieval or something else.