• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Inserting BLOB data

 
Ranch Hand
Posts: 52
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am facing a very critical issue when we try to insert a file in the blob column in the Oracle database.
Steps for inserting data in Blob column in Oracle.
1) Insert other fields and EMPTY_BLOB() in the Table T1.
2) Getting the byte array of the file and updating the blob column with this value.

Issue:
This is working fine with file of size less than 4KB. But if it is more than '4KB' it is giving the following error:
"java.sql.SQLException: Data size bigger than max size for this type: 10640"

Code snippet:-

dao.setBytes(1, objAttachment.getFileObject()); //getFileObject() returns byte[]

Please suggest how can we resolve this issue.

Many thanks
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic