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 Blob & Clob 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 "Blob & Clob" Watch "Blob & Clob" New topic

Blob & Clob

Shaan Shar
Ranch Hand

Joined: Dec 27, 2005
Posts: 1249

Very Often we have to store the Binary data in Database
In that condition I have studied somwhere that there are two Interfaces in java.sql package called as Blob & Clob

Now If I want to store suppose a media file.
Now could anyone illustrate me with a very simple code how to use Blob & Clob

Don't think so that I haven't tried this ownself
but I failed to locate any single example.

Now I moved to this JDBC Forum.
So I hope I will get solution.

I also know that Blob & Clob are Interfaces so we cann't create an Object of these two.
So pls Illustrate by a very simple example
Suppose the media file is situated in


Now how should I store this media file in Database.

Thankx in Advance.....

Shaan Shar
Ranch Hand

Joined: Dec 27, 2005
Posts: 1249

It Seems no one is trying this one... Is there any specific reason for this problem. then tell me out.

Atleast I need answer from Moderator whether should I move this question to Java Forum or not....

I am waiting for your reply .. Moderator.
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
Maybe the reason why you didn't get a reply is that apparently you haven't even searched Google, so you must not be trying very hard. Look here, here, and here.
[ April 19, 2006: Message edited by: Ulf Dittmer ]
Shaan Shar
Ranch Hand

Joined: Dec 27, 2005
Posts: 1249

Ulf Dittmer,

I knew that you are simply great, Thankx a lot for your valuable efforts.

Bartenders are really great.....

I am glad to be a member of this forum.
I agree. Here's the link:
subject: Blob & Clob
It's not a secret anymore!