File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Image insertion into database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Image insertion into database" Watch "Image insertion into database" New topic

Image insertion into database

Gvn Karthik

Joined: Feb 07, 2011
Posts: 22
I have Oracle 10g Express Edition installed. I'm not able to insert images into the database of size greater than 3kB. I want to insert images of higher sizes say 200kB.

When I checked the size of the image column which is of BLOB type, the size turned out to be 4000. That explains why I was not able to insert an image of higher size.

How do I increase the size of the BLOB field so that I can store bigger images?
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33102

Oracle 10g allows up to 4 gigabytes in a BLOB. The express edition is a different product though and might not allow big files at all.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Blaidd Gwael

Joined: Oct 01, 2009
Posts: 13

Have you read: Oracle ?
Gvn Karthik

Joined: Feb 07, 2011
Posts: 22
I read the stuff from the links above but I could not create the table successfully. How should I modify the following query to suit larger image insertion?

create table images(imageid number(10), photo blob);

I agree. Here's the link:
subject: Image insertion into database
It's not a secret anymore!