Skip to Main Content

Application Development Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Updating a blob field doesn't work

Milind.k-OCJul 25 2016 — edited Aug 3 2016
   Hello All,
  I am using the below code to update Blob attribute but it doesn't change the content even after successful execution
  There is no error in the logs. If I try to update a String attribute, it gets updated. So looks like something wrong only with Blob type of attributes.
 
  I tried reading blob value immediately after calling setBinaryData, I get the same old value! which means .setBinaryData itself is not working for me.
 
  Please let me know if you know the reason and possible solution.
  I am using 11.1.1.6.

Code:

BlobObject blobObj =  (BlobObject) assetData.getAttributeData("attributeName").getData();  
byte[] d = value.getBytes();  
blobObj.setBinaryData(d);  

assetData.getAttributeData("attributeName").setData(blobObj);

AssetDataManager.update( Collections.singletonList(assetData) );

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 31 2016
Added on Jul 25 2016
2 comments
499 views